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: gcs:9090
  24. GCS_API_SCHEME: http
  25. GCS_PROJECT_ID: fake
  26. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  27. MOCHA_GREP: ${MOCHA_GREP}
  28. NODE_ENV: test
  29. NODE_OPTIONS: "--unhandled-rejections=strict"
  30. depends_on:
  31. mongo:
  32. condition: service_healthy
  33. postgres:
  34. condition: service_healthy
  35. gcs:
  36. condition: service_healthy
  37. user: node
  38. command: npm run test:acceptance:_run
  39. tar:
  40. build: .
  41. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  42. volumes:
  43. - ./:/tmp/build/
  44. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  45. user: root
  46. mongo:
  47. image: mongo:4.4.16
  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:v1.21.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