docker-compose.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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:22.18.0
  7. volumes:
  8. - .:/overleaf/services/contacts
  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/contacts
  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. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  21. command: npm run --silent test:unit
  22. user: node
  23. depends_on:
  24. mongo:
  25. condition: service_started
  26. test_acceptance:
  27. image: node:22.18.0
  28. volumes:
  29. - .:/overleaf/services/contacts
  30. - ../../node_modules:/overleaf/node_modules
  31. - ../../libraries:/overleaf/libraries
  32. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  33. - ../../tools/migrations:/overleaf/tools/migrations
  34. working_dir: /overleaf/services/contacts
  35. environment:
  36. ELASTIC_SEARCH_DSN: es:9200
  37. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  38. POSTGRES_HOST: postgres
  39. MOCHA_GREP: ${MOCHA_GREP}
  40. LOG_LEVEL: ${LOG_LEVEL:-}
  41. NODE_ENV: test
  42. NODE_OPTIONS: "--unhandled-rejections=strict"
  43. user: node
  44. depends_on:
  45. mongo:
  46. condition: service_started
  47. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  48. command: npm run --silent test:acceptance
  49. mongo:
  50. image: mongo:8.0.11
  51. command: --replSet overleaf --notablescan
  52. volumes:
  53. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  54. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  55. entrypoint: /mongodb-docker-entrypoint-wait.sh
  56. environment:
  57. MONGO_INITDB_DATABASE: sharelatex
  58. extra_hosts:
  59. # Required when using the automatic database setup for initializing the
  60. # replica set. This override is not needed when running the setup after
  61. # starting up mongo.
  62. - mongo:127.0.0.1