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