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