docker-compose.ci.yml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. - ./reports:/overleaf/services/document-updater/reports
  10. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  11. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  12. command: npm run test:unit:_run
  13. environment:
  14. CI:
  15. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  16. NODE_ENV: test
  17. NODE_OPTIONS: "--unhandled-rejections=strict"
  18. REDIS_HOST: redis_test
  19. QUEUES_REDIS_HOST: redis_test
  20. HISTORY_REDIS_HOST: redis_test
  21. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  22. depends_on:
  23. mongo:
  24. condition: service_started
  25. redis_test:
  26. condition: service_healthy
  27. test_acceptance:
  28. build: .
  29. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  30. environment:
  31. CI:
  32. ELASTIC_SEARCH_DSN: es:9200
  33. REDIS_HOST: redis_test
  34. QUEUES_REDIS_HOST: redis_test
  35. HISTORY_REDIS_HOST: redis_test
  36. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  37. MONGO_HOST: mongo
  38. POSTGRES_HOST: postgres
  39. MOCHA_GREP: ${MOCHA_GREP}
  40. NODE_ENV: test
  41. NODE_OPTIONS: "--unhandled-rejections=strict"
  42. volumes:
  43. - ./reports:/overleaf/services/document-updater/reports
  44. - ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
  45. depends_on:
  46. mongo:
  47. condition: service_started
  48. redis_test:
  49. condition: service_healthy
  50. user: node
  51. entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
  52. command: npm run test:acceptance
  53. tar:
  54. build: .
  55. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  56. volumes:
  57. - ./:/tmp/build/
  58. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  59. user: root
  60. redis_test:
  61. image: redis:7.4.3
  62. healthcheck:
  63. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  64. interval: 1s
  65. retries: 20
  66. mongo:
  67. image: mongo:8.0.11
  68. command: --replSet overleaf --notablescan
  69. volumes:
  70. - ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  71. - ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
  72. entrypoint: /mongodb-docker-entrypoint-wait.sh
  73. environment:
  74. MONGO_INITDB_DATABASE: sharelatex
  75. extra_hosts:
  76. # Required when using the automatic database setup for initializing the
  77. # replica set. This override is not needed when running the setup after
  78. # starting up mongo.
  79. - mongo:127.0.0.1