docker-compose.yml 5.8 KB

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