docker-compose.ci.yml 1.7 KB

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