docker-compose.ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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=0 --
  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. environment:
  48. MONGO_INITDB_DATABASE: sharelatex
  49. extra_hosts:
  50. # Required when using the automatic database setup for initializing the
  51. # replica set. This override is not needed when running the setup after
  52. # starting up mongo.
  53. - mongo:127.0.0.1
  54. gcs:
  55. image: fsouza/fake-gcs-server:1.45.2
  56. command: ["--port=9090", "--scheme=http"]
  57. healthcheck:
  58. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  59. interval: 1s
  60. retries: 20