docker-compose.ci.yml 2.8 KB

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