docker-compose.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. services:
  2. sharelatex:
  3. restart: always
  4. # Server Pro users:
  5. # image: quay.io/sharelatex/sharelatex-pro
  6. image: sharelatex/sharelatex
  7. container_name: sharelatex
  8. depends_on:
  9. mongo:
  10. condition: service_healthy
  11. redis:
  12. condition: service_started
  13. ports:
  14. - 80:80
  15. stop_grace_period: 60s
  16. volumes:
  17. - ~/sharelatex_data:/var/lib/overleaf
  18. ########################################################################
  19. #### Server Pro: Uncomment the following line to mount the docker ####
  20. #### socket, required for Sibling Containers to work ####
  21. ########################################################################
  22. # - /var/run/docker.sock:/var/run/docker.sock
  23. environment:
  24. OVERLEAF_APP_NAME: Overleaf Community Edition
  25. OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex
  26. # Same property, unfortunately with different names in
  27. # different locations
  28. OVERLEAF_REDIS_HOST: redis
  29. REDIS_HOST: redis
  30. ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  31. # Enables Thumbnail generation using ImageMagick
  32. ENABLE_CONVERSIONS: 'true'
  33. # Disables email confirmation requirement
  34. EMAIL_CONFIRMATION_DISABLED: 'true'
  35. ## Set for SSL via nginx-proxy
  36. #VIRTUAL_HOST: 103.112.212.22
  37. # OVERLEAF_SITE_URL: http://overleaf.example.com
  38. # OVERLEAF_NAV_TITLE: Overleaf Community Edition
  39. # OVERLEAF_HEADER_IMAGE_URL: http://example.com/mylogo.png
  40. # OVERLEAF_ADMIN_EMAIL: support@it.com
  41. # OVERLEAF_LEFT_FOOTER: '[{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'
  42. # OVERLEAF_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'
  43. # OVERLEAF_EMAIL_FROM_ADDRESS: "hello@example.com"
  44. # OVERLEAF_EMAIL_AWS_SES_ACCESS_KEY_ID:
  45. # OVERLEAF_EMAIL_AWS_SES_SECRET_KEY:
  46. # OVERLEAF_EMAIL_SMTP_HOST: smtp.example.com
  47. # OVERLEAF_EMAIL_SMTP_PORT: 587
  48. # OVERLEAF_EMAIL_SMTP_SECURE: false
  49. # OVERLEAF_EMAIL_SMTP_USER:
  50. # OVERLEAF_EMAIL_SMTP_PASS:
  51. # OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH: true
  52. # OVERLEAF_EMAIL_SMTP_IGNORE_TLS: false
  53. # OVERLEAF_EMAIL_SMTP_NAME: '127.0.0.1'
  54. # OVERLEAF_EMAIL_SMTP_LOGGER: true
  55. # OVERLEAF_CUSTOM_EMAIL_FOOTER: "This system is run by department x"
  56. # ENABLE_CRON_RESOURCE_DELETION: true
  57. ################
  58. ## Server Pro ##
  59. ################
  60. ## The Community Edition is intended for use in environments where all users are trusted and is not appropriate for
  61. ## scenarios where isolation of users is required. Sandboxed Compiles are not available in the Community Edition,
  62. ## so the following environment variables must be commented out to avoid compile issues.
  63. ##
  64. ## Sandboxed Compiles: https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/server-pro-only-configuration/sandboxed-compiles
  65. SANDBOXED_COMPILES: 'true'
  66. ### Bind-mount source for /var/lib/overleaf/data/compiles inside the container.
  67. SANDBOXED_COMPILES_HOST_DIR_COMPILES: '/home/user/sharelatex_data/data/compiles'
  68. ### Bind-mount source for /var/lib/overleaf/data/output inside the container.
  69. SANDBOXED_COMPILES_HOST_DIR_OUTPUT: '/home/user/sharelatex_data/data/output'
  70. ### Backwards compatibility (before Server Pro 5.5)
  71. DOCKER_RUNNER: 'true'
  72. SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'
  73. ## Works with test LDAP server shown at bottom of docker compose
  74. # OVERLEAF_LDAP_URL: 'ldap://ldap:389'
  75. # OVERLEAF_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com'
  76. # OVERLEAF_LDAP_SEARCH_FILTER: '(uid={{username}})'
  77. # OVERLEAF_LDAP_BIND_DN: 'cn=admin,dc=planetexpress,dc=com'
  78. # OVERLEAF_LDAP_BIND_CREDENTIALS: 'GoodNewsEveryone'
  79. # OVERLEAF_LDAP_EMAIL_ATT: 'mail'
  80. # OVERLEAF_LDAP_NAME_ATT: 'cn'
  81. # OVERLEAF_LDAP_LAST_NAME_ATT: 'sn'
  82. # OVERLEAF_LDAP_UPDATE_USER_DETAILS_ON_LOGIN: 'true'
  83. # OVERLEAF_TEMPLATES_USER_ID: "578773160210479700917ee5"
  84. # OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'
  85. # OVERLEAF_PROXY_LEARN: "true"
  86. mongo:
  87. restart: always
  88. image: mongo:6.0
  89. container_name: mongo
  90. command: '--replSet overleaf'
  91. volumes:
  92. - ~/mongo_data:/data/db
  93. - ./bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  94. environment:
  95. MONGO_INITDB_DATABASE: sharelatex
  96. extra_hosts:
  97. # Required when using the automatic database setup for initializing the replica set.
  98. # This override is not needed when running the setup after starting up mongo.
  99. - mongo:127.0.0.1
  100. healthcheck:
  101. test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
  102. interval: 10s
  103. timeout: 10s
  104. retries: 5
  105. redis:
  106. restart: always
  107. image: redis:6.2
  108. container_name: redis
  109. volumes:
  110. - ~/redis_data:/data
  111. # ldap:
  112. # restart: always
  113. # image: rroemhild/test-openldap
  114. # container_name: ldap
  115. # See https://github.com/jwilder/nginx-proxy for documentation on how to configure the nginx-proxy container,
  116. # and https://github.com/overleaf/overleaf/wiki/HTTPS-reverse-proxy-using-Nginx for an example of some recommended
  117. # settings. We recommend using a properly managed nginx instance outside of the Overleaf Server Pro setup,
  118. # but the example here can be used if you'd prefer to run everything with docker-compose
  119. # nginx-proxy:
  120. # image: jwilder/nginx-proxy
  121. # container_name: nginx-proxy
  122. # ports:
  123. # - "80:80"
  124. # - "443:443"
  125. # volumes:
  126. # - /var/run/docker.sock:/tmp/docker.sock:ro
  127. # - /home/overleaf/tmp:/etc/nginx/certs