docker-compose.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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/notifications/Dockerfile
  9. target: base
  10. volumes:
  11. - .:/overleaf/services/notifications
  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. - ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
  21. working_dir: /overleaf/services/notifications
  22. environment:
  23. MOCHA_GREP: ${MOCHA_GREP}
  24. LOG_LEVEL: ${LOG_LEVEL:-}
  25. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  26. NODE_ENV: test
  27. NODE_OPTIONS: "--unhandled-rejections=strict"
  28. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  29. command: yarn run --silent test:unit
  30. user: node
  31. depends_on:
  32. mongo:
  33. condition: service_started
  34. test_acceptance:
  35. build:
  36. context: ../..
  37. dockerfile: services/notifications/Dockerfile
  38. target: base
  39. volumes:
  40. - .:/overleaf/services/notifications
  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. - ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
  50. working_dir: /overleaf/services/notifications
  51. environment:
  52. RETRIES:
  53. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  54. POSTGRES_HOST: postgres
  55. MOCHA_GREP: ${MOCHA_GREP}
  56. LOG_LEVEL: ${LOG_LEVEL:-}
  57. NODE_ENV: test
  58. NODE_OPTIONS: "--unhandled-rejections=strict"
  59. user: node
  60. depends_on:
  61. mongo:
  62. condition: service_started
  63. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  64. command: yarn run --silent test:acceptance
  65. mongo:
  66. image: mongo:8.0.11
  67. command: --replSet overleaf --notablescan
  68. volumes:
  69. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  70. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  71. entrypoint: /mongodb-docker-entrypoint-wait.sh
  72. environment:
  73. MONGO_INITDB_DATABASE: sharelatex
  74. extra_hosts:
  75. # Required when using the automatic database setup for initializing the
  76. # replica set. This override is not needed when running the setup after
  77. # starting up mongo.
  78. - mongo:127.0.0.1