docker-compose.ci.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  8. user: node
  9. command: npm run test:unit:_run
  10. environment:
  11. NODE_ENV: test
  12. NODE_OPTIONS: "--unhandled-rejections=strict"
  13. test_acceptance:
  14. build: .
  15. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  16. environment:
  17. ELASTIC_SEARCH_DSN: es:9200
  18. REDIS_HOST: redis
  19. QUEUES_REDIS_HOST: redis
  20. ANALYTICS_QUEUES_REDIS_HOST: redis
  21. MONGO_HOST: mongo
  22. POSTGRES_HOST: postgres
  23. GCS_API_ENDPOINT: http://gcs:9090
  24. GCS_PROJECT_ID: fake
  25. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  26. MOCHA_GREP: ${MOCHA_GREP}
  27. NODE_ENV: test
  28. NODE_OPTIONS: "--unhandled-rejections=strict"
  29. depends_on:
  30. mongo:
  31. condition: service_healthy
  32. postgres:
  33. condition: service_healthy
  34. gcs:
  35. condition: service_healthy
  36. user: node
  37. command: npm run test:acceptance:_run
  38. tar:
  39. build: .
  40. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  41. volumes:
  42. - ./:/tmp/build/
  43. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  44. user: root
  45. mongo:
  46. image: mongo:5.0.17
  47. command: --replSet overleaf
  48. healthcheck:
  49. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  50. interval: 1s
  51. retries: 20
  52. postgres:
  53. image: postgres:10
  54. environment:
  55. POSTGRES_USER: sharelatex
  56. POSTGRES_PASSWORD: sharelatex
  57. healthcheck:
  58. test: pg_isready --quiet
  59. interval: 1s
  60. retries: 20
  61. gcs:
  62. image: fsouza/fake-gcs-server:1.45.2
  63. command: ["--port=9090", "--scheme=http"]
  64. healthcheck:
  65. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  66. interval: 1s
  67. retries: 20