docker-compose.ci.yml 1.8 KB

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