docker-compose.ci.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. - ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
  11. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  12. command: npm run test:unit:_run
  13. environment:
  14. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  15. NODE_ENV: test
  16. NODE_OPTIONS: "--unhandled-rejections=strict"
  17. depends_on:
  18. mongo:
  19. condition: service_started
  20. test_acceptance:
  21. build: .
  22. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  23. environment:
  24. ELASTIC_SEARCH_DSN: es:9200
  25. MONGO_HOST: mongo
  26. POSTGRES_HOST: postgres
  27. MOCHA_GREP: ${MOCHA_GREP}
  28. NODE_ENV: test
  29. NODE_OPTIONS: "--unhandled-rejections=strict"
  30. volumes:
  31. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  32. depends_on:
  33. mongo:
  34. condition: service_started
  35. user: node
  36. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  37. command: npm run test:acceptance
  38. tar:
  39. build: .
  40. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  41. volumes:
  42. - ./:/tmp/build/
  43. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  44. user: root
  45. mongo:
  46. image: mongo:8.0.11
  47. command: --replSet overleaf
  48. volumes:
  49. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  50. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  51. entrypoint: /mongodb-docker-entrypoint-wait.sh
  52. environment:
  53. MONGO_INITDB_DATABASE: sharelatex
  54. extra_hosts:
  55. # Required when using the automatic database setup for initializing the
  56. # replica set. This override is not needed when running the setup after
  57. # starting up mongo.
  58. - mongo:127.0.0.1