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/overleaf/internal/
  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. MONGO_HOST: mongo
  19. POSTGRES_HOST: postgres
  20. GCS_API_ENDPOINT: http://gcs:9090
  21. GCS_PROJECT_ID: fake
  22. STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
  23. MOCHA_GREP: ${MOCHA_GREP}
  24. NODE_ENV: test
  25. NODE_OPTIONS: "--unhandled-rejections=strict"
  26. depends_on:
  27. mongo:
  28. condition: service_healthy
  29. postgres:
  30. condition: service_healthy
  31. gcs:
  32. condition: service_healthy
  33. user: node
  34. command: npm run test:acceptance
  35. tar:
  36. build: .
  37. image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
  38. volumes:
  39. - ./:/tmp/build/
  40. command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
  41. user: root
  42. mongo:
  43. image: mongo:6.0.13
  44. command: --replSet overleaf
  45. healthcheck:
  46. test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
  47. interval: 1s
  48. retries: 20
  49. postgres:
  50. image: postgres:10
  51. environment:
  52. POSTGRES_USER: overleaf
  53. POSTGRES_PASSWORD: overleaf
  54. POSTGRES_DB: overleaf-history-v1-test
  55. healthcheck:
  56. test: pg_isready --quiet
  57. interval: 1s
  58. retries: 20
  59. gcs:
  60. image: fsouza/fake-gcs-server:1.45.2
  61. command: ["--port=9090", "--scheme=http"]
  62. healthcheck:
  63. test: wget --quiet --output-document=/dev/null http://localhost:9090/storage/v1/b
  64. interval: 1s
  65. retries: 20