docker-compose.ci.yml 1.4 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/sharelatex/sharelatex-dev-environment
  4. version: "2.3"
  5. services:
  6. test_unit:
  7. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  8. user: node
  9. command: npm run test:unit:_run
  10. environment:
  11. NODE_ENV: test
  12. NODE_OPTIONS: "--unhandled-rejections=strict"
  13. test_acceptance:
  14. build: .
  15. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  16. environment:
  17. ELASTIC_SEARCH_DSN: es:9200
  18. REDIS_HOST: redis
  19. QUEUES_REDIS_HOST: redis
  20. MONGO_HOST: mongo
  21. POSTGRES_HOST: postgres
  22. MOCHA_GREP: ${MOCHA_GREP}
  23. NODE_ENV: test
  24. NODE_OPTIONS: "--unhandled-rejections=strict"
  25. depends_on:
  26. mongo:
  27. condition: service_healthy
  28. redis:
  29. condition: service_healthy
  30. user: node
  31. command: npm run test:acceptance:_run
  32. tar:
  33. build: .
  34. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  35. volumes:
  36. - ./:/tmp/build/
  37. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  38. user: root
  39. redis:
  40. image: redis
  41. healthcheck:
  42. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  43. interval: 1s
  44. retries: 20
  45. mongo:
  46. image: mongo:4.0
  47. healthcheck:
  48. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  49. interval: 1s
  50. retries: 20