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