docker-compose.yml 5.8 KB

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