docker-compose.ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. REDIS_HOST: redis
  18. QUEUES_REDIS_HOST: redis
  19. HISTORY_REDIS_HOST: redis
  20. ANALYTICS_QUEUES_REDIS_HOST: redis
  21. MONGO_HOST: mongo
  22. POSTGRES_HOST: postgres
  23. MOCHA_GREP: ${MOCHA_GREP}
  24. NODE_ENV: test
  25. NODE_OPTIONS: "--unhandled-rejections=strict"
  26. volumes:
  27. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  28. depends_on:
  29. mongo:
  30. condition: service_started
  31. redis:
  32. condition: service_healthy
  33. user: node
  34. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  35. command: npm run test:acceptance
  36. tar:
  37. build: .
  38. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  39. volumes:
  40. - ./:/tmp/build/
  41. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  42. user: root
  43. redis:
  44. image: redis:7.4.3
  45. healthcheck:
  46. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  47. interval: 1s
  48. retries: 20
  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