docker-compose.ci.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. AWS_S3_ENDPOINT: http://s3:9090
  23. AWS_S3_PATH_STYLE: 'true'
  24. AWS_ACCESS_KEY_ID: fake
  25. AWS_SECRET_ACCESS_KEY: fake
  26. MOCHA_GREP: ${MOCHA_GREP}
  27. NODE_ENV: test
  28. NODE_OPTIONS: "--unhandled-rejections=strict"
  29. AWS_BUCKET: bucket
  30. depends_on:
  31. mongo:
  32. condition: service_healthy
  33. redis:
  34. condition: service_healthy
  35. s3:
  36. condition: service_healthy
  37. user: node
  38. command: npm run test:acceptance:_run
  39. tar:
  40. build: .
  41. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  42. volumes:
  43. - ./:/tmp/build/
  44. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  45. user: root
  46. redis:
  47. image: redis
  48. healthcheck:
  49. test: ping="$$(redis-cli ping)" && [ "$$ping" = 'PONG' ]
  50. interval: 1s
  51. retries: 20
  52. mongo:
  53. image: mongo:4.2.15
  54. healthcheck:
  55. test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  56. interval: 1s
  57. retries: 20
  58. s3:
  59. image: adobe/s3mock
  60. environment:
  61. - initialBuckets=fake_user_files,fake_template_files,fake_public_files,bucket
  62. healthcheck:
  63. test: wget --quiet --output-document=/dev/null http://localhost:9090
  64. interval: 1s
  65. retries: 20