docker-compose.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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.18.2
  8. volumes:
  9. - .:/overleaf/services/history-v1
  10. - ../../node_modules:/overleaf/node_modules
  11. - ../../libraries:/overleaf/libraries
  12. working_dir: /overleaf/services/history-v1
  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.18.2
  21. volumes:
  22. - .:/overleaf/services/history-v1
  23. - ../../node_modules:/overleaf/node_modules
  24. - ../../libraries:/overleaf/libraries
  25. working_dir: /overleaf/services/history-v1
  26. environment:
  27. ELASTIC_SEARCH_DSN: es:9200
  28. REDIS_HOST: redis
  29. QUEUES_REDIS_HOST: redis
  30. ANALYTICS_QUEUES_REDIS_HOST: redis
  31. MONGO_HOST: mongo
  32. POSTGRES_HOST: postgres
  33. GCS_API_ENDPOINT: http://gcs:9090
  34. GCS_PROJECT_ID: fake
  35. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  36. MOCHA_GREP: ${MOCHA_GREP}
  37. LOG_LEVEL: ERROR
  38. NODE_ENV: test
  39. NODE_OPTIONS: "--unhandled-rejections=strict"
  40. user: node
  41. depends_on:
  42. mongo:
  43. condition: service_healthy
  44. postgres:
  45. condition: service_healthy
  46. gcs:
  47. condition: service_healthy
  48. command: npm run --silent test:acceptance
  49. mongo:
  50. image: mongo:5.0.17
  51. command: --replSet overleaf
  52. healthcheck:
  53. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  54. interval: 1s
  55. retries: 20
  56. postgres:
  57. image: postgres:10
  58. environment:
  59. POSTGRES_USER: sharelatex
  60. POSTGRES_PASSWORD: sharelatex
  61. healthcheck:
  62. test: pg_isready --host=localhost --quiet
  63. interval: 1s
  64. retries: 20
  65. gcs:
  66. image: fsouza/fake-gcs-server:1.45.2
  67. command: ["--port=9090", "--scheme=http"]
  68. healthcheck:
  69. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  70. interval: 1s
  71. retries: 20