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