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:16.17.1
  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:16.17.1
  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: gcs:9090
  34. GCS_API_SCHEME: http
  35. GCS_PROJECT_ID: fake
  36. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  37. MOCHA_GREP: ${MOCHA_GREP}
  38. LOG_LEVEL: ERROR
  39. NODE_ENV: test
  40. NODE_OPTIONS: "--unhandled-rejections=strict"
  41. user: node
  42. depends_on:
  43. mongo:
  44. condition: service_healthy
  45. postgres:
  46. condition: service_healthy
  47. gcs:
  48. condition: service_healthy
  49. command: npm run --silent test:acceptance
  50. mongo:
  51. image: mongo:4.4.16
  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:v1.21.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