From 40e19a66079d073311842fa5f2b4c9dbbab4eb48 Mon Sep 17 00:00:00 2001 From: LRVT <21357789+l4rm4nd@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:50:19 +0100 Subject: [PATCH] Update docker-compose.yml --- examples/overleaf/docker-compose.yml | 44 ++++++---------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/examples/overleaf/docker-compose.yml b/examples/overleaf/docker-compose.yml index 76729e7..dd4cb2a 100644 --- a/examples/overleaf/docker-compose.yml +++ b/examples/overleaf/docker-compose.yml @@ -19,36 +19,20 @@ services: stop_grace_period: 60s volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/sharelatex/data:/var/lib/overleaf - ######################################################################## - #### Server Pro: Uncomment the following line to mount the docker #### - #### socket, required for Sibling Containers to work #### - ######################################################################## # - /var/run/docker.sock:/var/run/docker.sock environment: OVERLEAF_APP_NAME: Overleaf Community Edition - OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex + OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?replicaSet=overleaf - # Same property, unfortunately with different names in - # different locations OVERLEAF_REDIS_HOST: redis REDIS_HOST: redis ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file' - - # Enables Thumbnail generation using ImageMagick ENABLE_CONVERSIONS: 'true' - - # Disables email confirmation requirement EMAIL_CONFIRMATION_DISABLED: 'true' - - # temporary fix for LuaLaTex compiles - # see https://github.com/overleaf/overleaf/issues/695 TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var - ## Set for SSL via nginx-proxy - #VIRTUAL_HOST: 103.112.212.22 - # OVERLEAF_SITE_URL: http://overleaf.example.com # OVERLEAF_NAV_TITLE: Overleaf Community Edition # OVERLEAF_HEADER_IMAGE_URL: http://example.com/mylogo.png @@ -58,10 +42,8 @@ services: # OVERLEAF_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]' # OVERLEAF_EMAIL_FROM_ADDRESS: "hello@example.com" - # OVERLEAF_EMAIL_AWS_SES_ACCESS_KEY_ID: # OVERLEAF_EMAIL_AWS_SES_SECRET_KEY: - # OVERLEAF_EMAIL_SMTP_HOST: smtp.example.com # OVERLEAF_EMAIL_SMTP_PORT: 587 # OVERLEAF_EMAIL_SMTP_SECURE: false @@ -75,18 +57,6 @@ services: # ENABLE_CRON_RESOURCE_DELETION: true - ################ - ## Server Pro ## - ################ - - # SANDBOXED_COMPILES: 'true' - - # SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true' - # SANDBOXED_COMPILES_HOST_DIR: '/var/sharelatex_data/data/compiles' - - # DOCKER_RUNNER: 'false' - - ## Works with test LDAP server shown at bottom of docker compose # OVERLEAF_LDAP_URL: 'ldap://ldap:389' # OVERLEAF_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com' # OVERLEAF_LDAP_SEARCH_FILTER: '(uid={{username}})' @@ -99,20 +69,24 @@ services: # OVERLEAF_TEMPLATES_USER_ID: "578773160210479700917ee5" # OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]' - - # OVERLEAF_PROXY_LEARN: "true" mongo: restart: always - image: mongo:5.0 + image: mongo:6.0 container_name: sharelatex-mongo + command: "--replSet overleaf" expose: - 27017 volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/sharelatex/mongo:/data/db + - ./mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js + environment: + MONGO_INITDB_DATABASE: sharelatex + extra_hosts: + - mongo:127.0.0.1 healthcheck: - test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet + test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet interval: 10s timeout: 10s retries: 5