docker-compose.ci.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # This file was auto-generated, do not edit it directly.
  2. # Instead run bin/update_build_scripts from
  3. # https://github.com/overleaf/internal/
  4. services:
  5. test_unit:
  6. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  7. user: node
  8. volumes:
  9. - ./reports:/overleaf/services/real-time/reports
  10. - ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
  11. command: npm run test:unit:_run
  12. environment:
  13. CI:
  14. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  15. NODE_ENV: test
  16. NODE_OPTIONS: "--unhandled-rejections=strict"
  17. VITEST_NO_CACHE: true
  18. REDIS_HOST: redis_test
  19. QUEUES_REDIS_HOST: redis_test
  20. HISTORY_REDIS_HOST: redis_test
  21. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  22. ANALYTICS_QUEUES_BQ_SINK_REDIS_HOST: redis_test
  23. depends_on:
  24. redis_test:
  25. condition: service_healthy
  26. test_acceptance:
  27. build: .
  28. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  29. environment:
  30. CI:
  31. RETRIES:
  32. REDIS_HOST: redis_test
  33. QUEUES_REDIS_HOST: redis_test
  34. HISTORY_REDIS_HOST: redis_test
  35. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  36. ANALYTICS_QUEUES_BQ_SINK_REDIS_HOST: redis_test
  37. MONGO_HOST: mongo
  38. POSTGRES_HOST: postgres
  39. MOCHA_GREP: ${MOCHA_GREP}
  40. NODE_ENV: test
  41. NODE_OPTIONS: "--unhandled-rejections=strict"
  42. volumes:
  43. - ./reports:/overleaf/services/real-time/reports
  44. depends_on:
  45. redis_test:
  46. condition: service_healthy
  47. user: node
  48. command: npm run test:acceptance
  49. tar:
  50. build: .
  51. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  52. volumes:
  53. - ./:/tmp/build/
  54. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  55. user: root
  56. redis_test:
  57. image: redis:7.4.8
  58. healthcheck:
  59. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  60. interval: 1s
  61. retries: 20