docker-compose.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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:18.20.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. NODE_ENV: test
  16. NODE_OPTIONS: "--unhandled-rejections=strict"
  17. command: npm run --silent test:unit
  18. user: node
  19. test_acceptance:
  20. image: node:18.20.2
  21. volumes:
  22. - .:/overleaf/services/docstore
  23. - ../../node_modules:/overleaf/node_modules
  24. - ../../libraries:/overleaf/libraries
  25. working_dir: /overleaf/services/docstore
  26. environment:
  27. ELASTIC_SEARCH_DSN: es:9200
  28. MONGO_HOST: mongo
  29. POSTGRES_HOST: postgres
  30. GCS_API_ENDPOINT: http://gcs:9090
  31. GCS_PROJECT_ID: fake
  32. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  33. MOCHA_GREP: ${MOCHA_GREP}
  34. LOG_LEVEL: ERROR
  35. NODE_ENV: test
  36. NODE_OPTIONS: "--unhandled-rejections=strict"
  37. user: node
  38. depends_on:
  39. mongo:
  40. condition: service_healthy
  41. gcs:
  42. condition: service_healthy
  43. command: npm run --silent test:acceptance
  44. mongo:
  45. image: mongo:6.0.13
  46. command: --replSet overleaf
  47. healthcheck:
  48. test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  49. interval: 1s
  50. retries: 20
  51. gcs:
  52. image: fsouza/fake-gcs-server:1.45.2
  53. command: ["--port=9090", "--scheme=http"]
  54. healthcheck:
  55. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  56. interval: 1s
  57. retries: 20