Added overleaf service

This commit is contained in:
2025-09-28 20:33:48 +02:00
parent a4151877d4
commit 909150f2b0
4 changed files with 92 additions and 0 deletions

5
overleaf/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM sharelatex/sharelatex:main
RUN tlmgr update --self && \
tlmgr install scheme-full && \
tlmgr path add

13
overleaf/build-images.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
cd /overleaf
git pull
cd server-ce
make build-base
make build-community
cd /services/overleaf
docker compose up -d --build

71
overleaf/compose.yml Normal file
View File

@@ -0,0 +1,71 @@
services:
overleaf:
build: .
container_name: overleaf
restart: always
depends_on:
overleaf_db:
condition: service_healthy
overleaf_redis:
condition: service_healthy
environment:
ENABLE_CONVERSIONS: true
OVERLEAF_ADMIN_EMAIL: mail@eliasfink.de
OVERLEAF_APP_NAME: EFtex
OVERLEAF_RIGHT_FOOTER: '[{"text": "Datenschutz", "url" : "https://privacy.eliasfink.de"}]'
OVERLEAF_EMAIL_FROM_ADDRESS: no-reply@eliasfink.de
OVERLEAF_EMAIL_SMTP_HOST: mxe92f.netcup.net
OVERLEAF_EMAIL_SMTP_PORT: 465
OVERLEAF_EMAIL_SMTP_SECURE: true
OVERLEAF_EMAIL_SMTP_USER: no-reply@eliasfink.de
OVERLEAF_EMAIL_SMTP_PASS: ${EMAIL_PASSWORD}
OVERLEAF_HEADER_IMAGE_URL: https://static.eliasfink.de/img/logo/logo.svg
OVERLEAF_MONGO_URL: mongodb://overleaf_db/overleaf
OVERLEAF_REDIS_HOST: overleaf_redis
OVERLEAF_SITE_LANGUAGE: de
OVERLEAF_SITE_URL: https://tex.eliasfink.de
REDIS_HOST: overleaf_redis
networks:
- default
- traefik
stop_grace_period: 60s
volumes:
- ./data:/var/lib/overleaf
overleaf_db:
image: mongo:6.0
container_name: overleaf_db
restart: always
command: --replSet overleaf
environment:
MONGO_INITDB_DATABASE: overleaf
extra_hosts:
- overleaf_db:127.0.0.1
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
interval: 30s
timeout: 10s
retries: 3
networks:
- default
volumes:
- ./db:/data/db
- ./config/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
overleaf_redis:
image: redis:6.2
container_name: overleaf_redis
restart: always
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 10s
retries: 3
networks:
- default
volumes:
- ./cache:/data
networks:
traefik:
external: true

View File

@@ -0,0 +1,3 @@
/* eslint-disable no-undef */
rs.initiate({ _id: 'overleaf', members: [{ _id: 0, host: 'overleaf_db:27017' }] })