-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Community Edition Feature Request: only sanbox-compile, no local texlive (with Source Code) #1430
Description
My friends CoPilot, Raptor Mini and myself wrote worked on the clsi service.
(Licence: GNU AFFERO GENERAL PUBLIC LICENSE Version 3)
I don't have the time to submit it through the regular PR process. If someone could adopt it: Thanks!
The goal was to remove the local & incomplete TexLive installation and switch to docker based compile. This is necessary since latex packages like minted need latex shell escape. And you shouldn't allow this without isolating the latex compile process from the rest of the server.
In addition, I tried to simplified the docker settings side of things. The goal was to have default settings that allow to use sandbox compile out of the box. Well, we succeeded mainly. Only the docker env parameter OVERLEAF_HOST_DATA_DIR needs to be set.
Small rant: I was not able to fill the default of OVERLEAF_HOST_DATA_DIR with the /var/lib/overleaf mouting point. The information is there from inside the container:
CONTAINER_ID=$(hostname)
curl --unix-socket /var/run/docker.sock \
["http://localhost/containers/overleafserver/json"](http://localhost/containers/overleafserver/json) | python3 -m json.tool | grep -A 20 '"Mounts"'
Nevertheless, raptor mini did fought against it like hell.
Another point is that the overleaf server container will get the texLive images before it gets ready (i.e. healthy). Pre-pull the images or wait...
shell escape works (is allowed by default now):

MULTI-IMAGES:
volumes:
- /data_1/docker/compose_cep/overleafserver/data:/var/lib/overleaf
- /var/run/docker.sock:/var/run/docker.sock
environment:
OVERLEAF_HOST_DATA_DIR: /data_1/docker/compose_cep/overleafserver/data
ALL_TEX_LIVE_DOCKER_IMAGES: texlive/texlive:latest-full, texlive/texlive:TL2024-historic, texlive/texlive:TL2023-historic
ALL_TEX_LIVE_DOCKER_IMAGE_NAMES: TeXLive 2025, TeXLive 2024, TeXLive 2023
DEFAULT SETTING:
volumes:
- /data_1/docker/compose_cep/overleafserver/data:/var/lib/overleaf
- /var/run/docker.sock:/var/run/docker.sock
environment:
OVERLEAF_HOST_DATA_DIR: /data_1/docker/compose_cep/overleafserver/data
Code
https://github.com/davrot/overleaf_with_admin_extension/tree/sandbox-compile
