docker-compose.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. version: '2.2'
  2. services:
  3. sharelatex:
  4. image: ${IMAGE_TAG_CE:-sharelatex/sharelatex:latest}
  5. stop_grace_period: 0s
  6. depends_on:
  7. mongo:
  8. condition: service_healthy
  9. redis:
  10. condition: service_started
  11. host-admin:
  12. # The host-admin service initiates the mongo replica set
  13. condition: service_healthy
  14. environment:
  15. OVERLEAF_SITE_URL: 'http://sharelatex'
  16. OVERLEAF_APP_NAME: Overleaf Community Edition
  17. OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
  18. OVERLEAF_REDIS_HOST: redis
  19. REDIS_HOST: redis
  20. ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  21. ENABLE_CONVERSIONS: 'true'
  22. EMAIL_CONFIRMATION_DISABLED: 'true'
  23. healthcheck:
  24. test: curl --fail http://localhost:3000/status
  25. interval: 3s
  26. timeout: 3s
  27. retries: 30
  28. mongo:
  29. image: mongo:5.0.17
  30. command: '--replSet overleaf'
  31. healthcheck:
  32. test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
  33. interval: 3s
  34. timeout: 3s
  35. retries: 30
  36. redis:
  37. image: redis:7.2.1
  38. git-bridge:
  39. image: quay.io/sharelatex/git-bridge:latest
  40. environment:
  41. GIT_BRIDGE_API_BASE_URL: "http://sharelatex:3000/api/v0/" # "http://sharelatex/api/v0/" for version 4.1.6 and earlier
  42. GIT_BRIDGE_OAUTH2_SERVER: "http://sharelatex"
  43. GIT_BRIDGE_POSTBACK_BASE_URL: "http://git-bridge:8000"
  44. GIT_BRIDGE_ROOT_DIR: "/data/git-bridge"
  45. user: root
  46. command: ["/server-pro-start.sh"]
  47. e2e:
  48. image: cypress/included:13.6.6
  49. stop_grace_period: 0s
  50. entrypoint: npm
  51. command: run cypress:run
  52. working_dir: /e2e
  53. volumes:
  54. - ./:/e2e
  55. environment:
  56. CYPRESS_SHARD:
  57. CYPRESS_BASE_URL: http://sharelatex
  58. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  59. depends_on:
  60. sharelatex:
  61. condition: service_healthy
  62. host-admin:
  63. condition: service_healthy
  64. e2e-open:
  65. image: cypress/included:13.6.6
  66. stop_grace_period: 0s
  67. entrypoint: npm
  68. command: run cypress:open
  69. working_dir: /e2e
  70. volumes:
  71. - ./:/e2e
  72. - /tmp/.X11-unix:/tmp/.X11-unix
  73. user: "${DOCKER_USER:-1000:1000}"
  74. environment:
  75. CYPRESS_SHARD:
  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. CYPRESS_SHARD:
  96. COMPOSE_PROJECT_NAME:
  97. TEX_LIVE_DOCKER_IMAGE:
  98. ALL_TEX_LIVE_DOCKER_IMAGES:
  99. IMAGE_TAG_CE: ${IMAGE_TAG_CE:-sharelatex/sharelatex:latest}
  100. IMAGE_TAG_PRO: ${IMAGE_TAG_PRO:-quay.io/sharelatex/sharelatex-pro:latest}
  101. depends_on:
  102. mongo:
  103. condition: service_healthy
  104. healthcheck:
  105. test: curl --fail http://localhost/status
  106. interval: 3s
  107. timeout: 3s
  108. retries: 30
  109. saml:
  110. restart: always
  111. image: gcr.io/overleaf-ops/saml-test
  112. environment:
  113. SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
  114. SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
  115. SAML_TEST_SP_LOCATION: 'http://sharelatex/saml/callback'
  116. ldap:
  117. restart: always
  118. image: rroemhild/test-openldap:1.1
  119. # Workaround large memory allocation (using the max-open-files-limit as socket buffer scale).
  120. # REF: https://github.com/moby/moby/issues/8231#issuecomment-63877553
  121. # REF: https://github.com/moby/moby/issues/8231#issuecomment-63871343
  122. command:
  123. - 'bash'
  124. - '-c'
  125. - 'ulimit -n 1024 && exec bash /run.sh'