docker-compose.ci.yml 2.0 KB

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