docker-compose.ci.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. services:
  5. test_unit:
  6. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  7. user: node
  8. command: npm run test:unit:_run
  9. environment:
  10. NODE_ENV: test
  11. NODE_OPTIONS: "--unhandled-rejections=strict"
  12. test_acceptance:
  13. build: .
  14. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  15. environment:
  16. ELASTIC_SEARCH_DSN: es:9200
  17. MONGO_HOST: mongo
  18. POSTGRES_HOST: postgres
  19. GCS_API_ENDPOINT: http://gcs:9090
  20. GCS_PROJECT_ID: fake
  21. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  22. MOCHA_GREP: ${MOCHA_GREP}
  23. NODE_ENV: test
  24. NODE_OPTIONS: "--unhandled-rejections=strict"
  25. volumes:
  26. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  27. depends_on:
  28. mongo:
  29. condition: service_started
  30. gcs:
  31. condition: service_healthy
  32. user: node
  33. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  34. command: npm run test:acceptance
  35. tar:
  36. build: .
  37. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  38. volumes:
  39. - ./:/tmp/build/
  40. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  41. user: root
  42. mongo:
  43. image: mongo:8.0.11
  44. command: --replSet overleaf
  45. volumes:
  46. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  47. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  48. entrypoint: /mongodb-docker-entrypoint-wait.sh
  49. environment:
  50. MONGO_INITDB_DATABASE: sharelatex
  51. extra_hosts:
  52. # Required when using the automatic database setup for initializing the
  53. # replica set. This override is not needed when running the setup after
  54. # starting up mongo.
  55. - mongo:127.0.0.1
  56. gcs:
  57. image: fsouza/fake-gcs-server:1.45.2
  58. command: ["--port=9090", "--scheme=http"]
  59. healthcheck:
  60. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  61. interval: 1s
  62. retries: 20