docker-compose.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. build:
  8. context: .
  9. target: base
  10. volumes:
  11. - .:/app
  12. working_dir: /app
  13. environment:
  14. MOCHA_GREP: ${MOCHA_GREP}
  15. NODE_ENV: test
  16. NODE_OPTIONS: "--unhandled-rejections=strict"
  17. command: npm run --silent test:unit
  18. user: node
  19. test_acceptance:
  20. build:
  21. context: .
  22. target: base
  23. volumes:
  24. - .:/app
  25. working_dir: /app
  26. environment:
  27. ELASTIC_SEARCH_DSN: es:9200
  28. REDIS_HOST: redis
  29. QUEUES_REDIS_HOST: redis
  30. MONGO_HOST: mongo
  31. POSTGRES_HOST: postgres
  32. MOCHA_GREP: ${MOCHA_GREP}
  33. LOG_LEVEL: ERROR
  34. NODE_ENV: test
  35. NODE_OPTIONS: "--unhandled-rejections=strict"
  36. user: node
  37. depends_on:
  38. mongo:
  39. condition: service_healthy
  40. command: npm run --silent test:acceptance
  41. mongo:
  42. image: mongo:4.0
  43. healthcheck:
  44. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  45. interval: 1s
  46. retries: 20