docker-compose.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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: node:12.21.0
  8. volumes:
  9. - .:/app
  10. working_dir: /app
  11. environment:
  12. MOCHA_GREP: ${MOCHA_GREP}
  13. NODE_ENV: test
  14. NODE_OPTIONS: "--unhandled-rejections=strict"
  15. command: npm run --silent test:unit
  16. user: node
  17. test_acceptance:
  18. image: node:12.21.0
  19. volumes:
  20. - .:/app
  21. working_dir: /app
  22. extends:
  23. file: docker-compose-config.yml
  24. service: dev
  25. environment:
  26. ELASTIC_SEARCH_DSN: es:9200
  27. REDIS_HOST: redis
  28. QUEUES_REDIS_HOST: redis
  29. MONGO_HOST: mongo
  30. POSTGRES_HOST: postgres
  31. GCS_API_ENDPOINT: gcs:9090
  32. GCS_API_SCHEME: http
  33. GCS_PROJECT_ID: fake
  34. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  35. MOCHA_GREP: ${MOCHA_GREP}
  36. LOG_LEVEL: ERROR
  37. NODE_ENV: test
  38. NODE_OPTIONS: "--unhandled-rejections=strict"
  39. user: node
  40. depends_on:
  41. mongo:
  42. condition: service_healthy
  43. gcs:
  44. condition: service_healthy
  45. command: npm run --silent test:acceptance
  46. mongo:
  47. image: mongo:4.0
  48. healthcheck:
  49. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  50. interval: 1s
  51. retries: 20
  52. gcs:
  53. image: fsouza/fake-gcs-server:v1.21.2
  54. command: ["--port=9090", "--scheme=http"]
  55. healthcheck:
  56. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  57. interval: 1s
  58. retries: 20