docker-compose.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. version: "2.3"
  5. services:
  6. test_unit:
  7. image: node:20.18.2
  8. volumes:
  9. - .:/overleaf/services/docstore
  10. - ../../node_modules:/overleaf/node_modules
  11. - ../../libraries:/overleaf/libraries
  12. working_dir: /overleaf/services/docstore
  13. environment:
  14. MOCHA_GREP: ${MOCHA_GREP}
  15. LOG_LEVEL: ${LOG_LEVEL:-}
  16. NODE_ENV: test
  17. NODE_OPTIONS: "--unhandled-rejections=strict"
  18. command: npm run --silent test:unit
  19. user: node
  20. test_acceptance:
  21. image: node:20.18.2
  22. volumes:
  23. - .:/overleaf/services/docstore
  24. - ../../node_modules:/overleaf/node_modules
  25. - ../../libraries:/overleaf/libraries
  26. working_dir: /overleaf/services/docstore
  27. environment:
  28. ELASTIC_SEARCH_DSN: es:9200
  29. MONGO_HOST: mongo
  30. POSTGRES_HOST: postgres
  31. GCS_API_ENDPOINT: http://gcs:9090
  32. GCS_PROJECT_ID: fake
  33. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  34. MOCHA_GREP: ${MOCHA_GREP}
  35. LOG_LEVEL: ${LOG_LEVEL:-}
  36. NODE_ENV: test
  37. NODE_OPTIONS: "--unhandled-rejections=strict"
  38. user: node
  39. depends_on:
  40. mongo:
  41. condition: service_started
  42. gcs:
  43. condition: service_healthy
  44. command: npm run --silent test:acceptance
  45. mongo:
  46. image: mongo:6.0.13
  47. command: --replSet overleaf
  48. volumes:
  49. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  50. environment:
  51. MONGO_INITDB_DATABASE: sharelatex
  52. extra_hosts:
  53. # Required when using the automatic database setup for initializing the
  54. # replica set. This override is not needed when running the setup after
  55. # starting up mongo.
  56. - mongo:127.0.0.1
  57. gcs:
  58. image: fsouza/fake-gcs-server:1.45.2
  59. command: ["--port=9090", "--scheme=http"]
  60. healthcheck:
  61. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  62. interval: 1s
  63. retries: 20