docker-compose.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_SITE_URL: 'http://sharelatex'
  18. OVERLEAF_APP_NAME: Overleaf Community Edition
  19. OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
  20. OVERLEAF_REDIS_HOST: redis
  21. REDIS_HOST: redis
  22. ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  23. ENABLE_CONVERSIONS: 'true'
  24. EMAIL_CONFIRMATION_DISABLED: 'true'
  25. healthcheck:
  26. test: curl --fail http://localhost:3000/status
  27. interval: 3s
  28. timeout: 3s
  29. retries: 30
  30. mongo:
  31. image: mongo:5.0.17
  32. command: '--replSet overleaf'
  33. healthcheck:
  34. test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
  35. interval: 3s
  36. timeout: 3s
  37. retries: 30
  38. redis:
  39. image: redis:7.2.1
  40. git-bridge:
  41. image: quay.io/sharelatex/git-bridge:latest
  42. environment:
  43. GIT_BRIDGE_API_BASE_URL: "http://sharelatex:3000/api/v0/" # "http://sharelatex/api/v0/" for version 4.1.6 and earlier
  44. GIT_BRIDGE_OAUTH2_SERVER: "http://sharelatex"
  45. GIT_BRIDGE_POSTBACK_BASE_URL: "http://git-bridge:8000"
  46. GIT_BRIDGE_ROOT_DIR: "/data/git-bridge"
  47. user: root
  48. command: ["/server-pro-start.sh"]
  49. e2e:
  50. image: cypress/included:13.6.6
  51. stop_grace_period: 0s
  52. entrypoint: npm
  53. command: run cypress:run
  54. working_dir: /e2e
  55. volumes:
  56. - ./:/e2e
  57. environment:
  58. CYPRESS_BASE_URL: http://sharelatex
  59. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  60. depends_on:
  61. sharelatex:
  62. condition: service_healthy
  63. host-admin:
  64. condition: service_healthy
  65. e2e-open:
  66. image: cypress/included:13.6.6
  67. stop_grace_period: 0s
  68. entrypoint: npm
  69. command: run cypress:open
  70. working_dir: /e2e
  71. volumes:
  72. - ./:/e2e
  73. - /tmp/.X11-unix:/tmp/.X11-unix
  74. user: "${DOCKER_USER:-1000:1000}"
  75. environment:
  76. CYPRESS_BASE_URL: http://sharelatex
  77. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  78. DISPLAY: ${DISPLAY:-:0}
  79. depends_on:
  80. sharelatex:
  81. condition: service_healthy
  82. host-admin:
  83. condition: service_healthy
  84. host-admin:
  85. build: .
  86. entrypoint: ["node", "--watch", "host-admin.js"]
  87. # See comment in Makefile regarding matching file paths
  88. working_dir: $PWD
  89. volumes:
  90. - $PWD:$PWD
  91. - /var/run/docker.sock:/var/run/docker.sock
  92. stop_grace_period: 0s
  93. environment:
  94. PWD:
  95. TEX_LIVE_DOCKER_IMAGE:
  96. ALL_TEX_LIVE_DOCKER_IMAGES:
  97. IMAGE_TAG_CE: ${IMAGE_TAG_CE:-sharelatex/sharelatex:latest}
  98. IMAGE_TAG_PRO: ${IMAGE_TAG_PRO:-quay.io/sharelatex/sharelatex-pro:latest}
  99. depends_on:
  100. mongo:
  101. condition: service_healthy
  102. healthcheck:
  103. test: curl --fail http://localhost/status
  104. interval: 3s
  105. timeout: 3s
  106. retries: 30