docker-compose.ci.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
  11. NODE_ENV: test
  12. NODE_OPTIONS: "--unhandled-rejections=strict"
  13. REDIS_HOST: redis_test
  14. QUEUES_REDIS_HOST: redis_test
  15. HISTORY_REDIS_HOST: redis_test
  16. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  17. depends_on:
  18. redis_test:
  19. condition: service_healthy
  20. test_acceptance:
  21. build: .
  22. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  23. environment:
  24. ELASTIC_SEARCH_DSN: es:9200
  25. REDIS_HOST: redis_test
  26. QUEUES_REDIS_HOST: redis_test
  27. HISTORY_REDIS_HOST: redis_test
  28. ANALYTICS_QUEUES_REDIS_HOST: redis_test
  29. MONGO_HOST: mongo
  30. POSTGRES_HOST: postgres
  31. MOCHA_GREP: ${MOCHA_GREP}
  32. NODE_ENV: test
  33. NODE_OPTIONS: "--unhandled-rejections=strict"
  34. depends_on:
  35. redis_test:
  36. condition: service_healthy
  37. user: node
  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. redis_test:
  47. image: redis:7.4.3
  48. healthcheck:
  49. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  50. interval: 1s
  51. retries: 20