docker-compose.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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/docstore
  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. - ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
  14. working_dir: /overleaf/services/docstore
  15. environment:
  16. MOCHA_GREP: ${MOCHA_GREP}
  17. LOG_LEVEL: ${LOG_LEVEL:-}
  18. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  19. NODE_ENV: test
  20. NODE_OPTIONS: "--unhandled-rejections=strict"
  21. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  22. command: npm run --silent test:unit
  23. user: node
  24. depends_on:
  25. mongo:
  26. condition: service_started
  27. test_acceptance:
  28. image: node:24.14.1
  29. volumes:
  30. - .:/overleaf/services/docstore
  31. - ../../node_modules:/overleaf/node_modules
  32. - ../../libraries:/overleaf/libraries
  33. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  34. - ../../tools/migrations:/overleaf/tools/migrations
  35. working_dir: /overleaf/services/docstore
  36. environment:
  37. RETRIES:
  38. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  39. POSTGRES_HOST: postgres
  40. GCS_API_ENDPOINT: http://gcs:9090
  41. GCS_PROJECT_ID: fake
  42. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  43. MOCHA_GREP: ${MOCHA_GREP}
  44. LOG_LEVEL: ${LOG_LEVEL:-}
  45. NODE_ENV: test
  46. NODE_OPTIONS: "--unhandled-rejections=strict"
  47. user: node
  48. depends_on:
  49. mongo:
  50. condition: service_started
  51. gcs:
  52. condition: service_healthy
  53. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  54. command: npm run --silent test:acceptance
  55. mongo:
  56. image: mongo:8.0.11
  57. command: --replSet overleaf --notablescan
  58. volumes:
  59. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  60. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  61. entrypoint: /mongodb-docker-entrypoint-wait.sh
  62. environment:
  63. MONGO_INITDB_DATABASE: sharelatex
  64. extra_hosts:
  65. # Required when using the automatic database setup for initializing the
  66. # replica set. This override is not needed when running the setup after
  67. # starting up mongo.
  68. - mongo:127.0.0.1
  69. gcs:
  70. image: fsouza/fake-gcs-server:1.52.3
  71. command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
  72. healthcheck:
  73. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  74. interval: 1s
  75. retries: 20