docker-compose.ci.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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/document-updater/reports
  10. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  11. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  12. command: yarn run test:unit:_run
  13. environment:
  14. CI:
  15. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  16. NODE_ENV: test
  17. NODE_OPTIONS: "--unhandled-rejections=strict"
  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. mongo:
  25. condition: service_started
  26. redis_test:
  27. condition: service_healthy
  28. test_acceptance:
  29. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  30. environment:
  31. CI:
  32. RETRIES:
  33. REDIS_HOST: redis_test
  34. QUEUES_REDIS_HOST: redis_test
  35. HISTORY_REDIS_HOST: redis_test
  36. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  37. ANALYTICS_QUEUES_BQ_SINK_REDIS_HOST: redis_test
  38. MONGO_HOST: mongo
  39. POSTGRES_HOST: postgres
  40. MOCHA_GREP: ${MOCHA_GREP}
  41. NODE_ENV: test
  42. NODE_OPTIONS: "--unhandled-rejections=strict"
  43. volumes:
  44. - ./reports:/overleaf/services/document-updater/reports
  45. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  46. depends_on:
  47. mongo:
  48. condition: service_started
  49. redis_test:
  50. condition: service_healthy
  51. user: node
  52. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  53. command: yarn run test:acceptance
  54. tar:
  55. build: .
  56. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  57. volumes:
  58. - ./:/tmp/build/
  59. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  60. user: root
  61. redis_test:
  62. image: redis:7.4.8
  63. healthcheck:
  64. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  65. interval: 1s
  66. retries: 20
  67. mongo:
  68. image: mongo:8.0.11
  69. command: --replSet overleaf --notablescan
  70. volumes:
  71. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  72. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  73. entrypoint: /mongodb-docker-entrypoint-wait.sh
  74. environment:
  75. MONGO_INITDB_DATABASE: sharelatex
  76. extra_hosts:
  77. # Required when using the automatic database setup for initializing the
  78. # replica set. This override is not needed when running the setup after
  79. # starting up mongo.
  80. - mongo:127.0.0.1