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