version: '3' services: sharelatex: image: docker.1ms.run/sharelatex/sharelatex:latest container_name: overleaf restart: always depends_on: - mongo - redis ports: - 18090:80 volumes: - overleaf-data:/var/lib/overleaf environment: OVERLEAF_APP_NAME: "LaTeX 论文编辑器" OVERLEAF_MONGO_URL: "mongodb://mongo/overleaf?replicaSet=overleaf" OVERLEAF_REDIS_HOST: "redis" REDIS_HOST: "redis" ENABLED_LINKED_FILE_TYPES: "project_file,project_output_file" ENABLE_CONVERSIONS: "true" EMAIL_CONFIRMATION_DISABLED: "true" OVERLEAF_SITE_URL: "http://localhost:18090" OVERLEAF_LEFT_OPEN_REGISTRATION: "true" mongo: image: docker.1ms.run/mongo:8.0 container_name: overleaf-mongo restart: always command: --replSet overleaf volumes: - overleaf-mongo:/data/db healthcheck: test: > mongosh --eval "try { rs.status().ok } catch(e) { rs.initiate({_id:'overleaf',members:[{_id:0,host:'mongo:27017'}]}).ok }" --quiet interval: 10s timeout: 10s retries: 5 redis: image: docker.1ms.run/redis:7-alpine container_name: overleaf-redis restart: always volumes: - overleaf-redis:/data volumes: overleaf-data: overleaf-mongo: overleaf-redis: