docker-compose.yml 1.4 KB

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