docker-compose.yml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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: node:24.14.1
  7. volumes:
  8. - .:/overleaf/services/project-history
  9. - ../../node_modules:/overleaf/node_modules
  10. - ../../libraries:/overleaf/libraries
  11. - ../../package.json:/overleaf/package.json
  12. - ../../.yarnrc.yml:/overleaf/.yarnrc.yml
  13. - ../../yarn.lock:/overleaf/yarn.lock
  14. - ../../.yarn:/overleaf/.yarn
  15. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  16. - ../../tools/migrations:/overleaf/tools/migrations
  17. working_dir: /overleaf/services/project-history
  18. environment:
  19. MOCHA_GREP: ${MOCHA_GREP}
  20. LOG_LEVEL: ${LOG_LEVEL:-}
  21. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  22. NODE_ENV: test
  23. NODE_OPTIONS: "--unhandled-rejections=strict"
  24. REDIS_HOST: redis_test
  25. HISTORY_REDIS_HOST: redis_test
  26. QUEUES_REDIS_HOST: redis_test
  27. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  28. ANALYTICS_QUEUES_BQ_SINK_REDIS_HOST: redis_test
  29. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  30. command: corepack yarn run --silent test:unit
  31. user: node
  32. depends_on:
  33. mongo:
  34. condition: service_started
  35. redis_test:
  36. condition: service_healthy
  37. test_acceptance:
  38. image: node:24.14.1
  39. volumes:
  40. - .:/overleaf/services/project-history
  41. - ../../node_modules:/overleaf/node_modules
  42. - ../../libraries:/overleaf/libraries
  43. - ../../package.json:/overleaf/package.json
  44. - ../../.yarnrc.yml:/overleaf/.yarnrc.yml
  45. - ../../yarn.lock:/overleaf/yarn.lock
  46. - ../../.yarn:/overleaf/.yarn
  47. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  48. - ../../tools/migrations:/overleaf/tools/migrations
  49. working_dir: /overleaf/services/project-history
  50. environment:
  51. RETRIES:
  52. REDIS_HOST: redis_test
  53. HISTORY_REDIS_HOST: redis_test
  54. QUEUES_REDIS_HOST: redis_test
  55. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  56. ANALYTICS_QUEUES_BQ_SINK_REDIS_HOST: redis_test
  57. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  58. POSTGRES_HOST: postgres
  59. MOCHA_GREP: ${MOCHA_GREP}
  60. LOG_LEVEL: ${LOG_LEVEL:-}
  61. NODE_ENV: test
  62. NODE_OPTIONS: "--unhandled-rejections=strict"
  63. user: node
  64. depends_on:
  65. mongo:
  66. condition: service_started
  67. redis_test:
  68. condition: service_healthy
  69. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  70. command: corepack yarn run --silent test:acceptance
  71. redis_test:
  72. image: redis:7.4.8
  73. healthcheck:
  74. test: ping=$$(redis-cli ping) && [ "$$ping" = 'PONG' ]
  75. interval: 1s
  76. retries: 20
  77. mongo:
  78. image: mongo:8.0.11
  79. command: --replSet overleaf --notablescan
  80. volumes:
  81. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  82. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  83. entrypoint: /mongodb-docker-entrypoint-wait.sh
  84. environment:
  85. MONGO_INITDB_DATABASE: sharelatex
  86. extra_hosts:
  87. # Required when using the automatic database setup for initializing the
  88. # replica set. This override is not needed when running the setup after
  89. # starting up mongo.
  90. - mongo:127.0.0.1