docker-compose.yml 3.5 KB

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