docker-compose.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. version: '2.2'
  2. services:
  3. sharelatex:
  4. image: ${IMAGE_TAG_CE:-sharelatex/sharelatex:latest}
  5. # TODO(das7pad): increase timeout after speeding up the graceful shutdown procedure
  6. # stop_grace_period: 60s
  7. stop_grace_period: 0s
  8. depends_on:
  9. mongo:
  10. condition: service_healthy
  11. redis:
  12. condition: service_started
  13. host-admin:
  14. # The host-admin service initiates the mongo replica set
  15. condition: service_healthy
  16. environment:
  17. OVERLEAF_APP_NAME: Overleaf Community Edition
  18. OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
  19. OVERLEAF_REDIS_HOST: redis
  20. REDIS_HOST: redis
  21. ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  22. ENABLE_CONVERSIONS: 'true'
  23. EMAIL_CONFIRMATION_DISABLED: 'true'
  24. healthcheck:
  25. test: curl --fail http://localhost:3000/status || exit 1
  26. interval: 3s
  27. timeout: 10s
  28. retries: 10
  29. mongo:
  30. image: mongo:5.0.17
  31. command: '--replSet overleaf'
  32. healthcheck:
  33. test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
  34. interval: 10s
  35. timeout: 10s
  36. retries: 5
  37. redis:
  38. image: redis:7.2.1
  39. e2e:
  40. image: cypress/included:13.6.6
  41. stop_grace_period: 0s
  42. entrypoint: npm
  43. command: run cypress:run
  44. working_dir: /e2e
  45. volumes:
  46. - ./:/e2e
  47. environment:
  48. CYPRESS_BASE_URL: http://sharelatex
  49. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  50. depends_on:
  51. sharelatex:
  52. condition: service_healthy
  53. host-admin:
  54. condition: service_healthy
  55. e2e-open:
  56. image: cypress/included:13.6.6
  57. stop_grace_period: 0s
  58. entrypoint: npm
  59. command: run cypress:open
  60. working_dir: /e2e
  61. volumes:
  62. - ./:/e2e
  63. - /tmp/.X11-unix:/tmp/.X11-unix
  64. user: "${DOCKER_USER:-1000:1000}"
  65. environment:
  66. CYPRESS_BASE_URL: http://sharelatex
  67. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  68. DISPLAY: ${DISPLAY:-:0}
  69. depends_on:
  70. sharelatex:
  71. condition: service_healthy
  72. host-admin:
  73. condition: service_healthy
  74. host-admin:
  75. build: .
  76. entrypoint: ["node", "--watch", "host-admin.js"]
  77. # See comment in Makefile regarding matching file paths
  78. working_dir: $PWD
  79. volumes:
  80. - $PWD:$PWD
  81. - /var/run/docker.sock:/var/run/docker.sock
  82. stop_grace_period: 0s
  83. environment:
  84. PWD:
  85. IMAGE_TAG_CE: ${IMAGE_TAG_CE:-sharelatex/sharelatex:latest}
  86. IMAGE_TAG_PRO: ${IMAGE_TAG_PRO:-quay.io/sharelatex/sharelatex-pro:latest}
  87. depends_on:
  88. mongo:
  89. condition: service_healthy
  90. healthcheck:
  91. test: curl --fail http://localhost/status || exit 1
  92. interval: 3s
  93. timeout: 10s
  94. retries: 10