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