Fix cache storage landing in ephemeral /tmp

Upstream joins STORAGE_PATH onto os.tmpdir() unless
STORAGE_PATH_USE_TMP_FOLDER=false, even for absolute paths, so the
container wrote artifacts to /tmp/app/cache instead of the bind mount
and lost them on every restart. Set the flag in both config.env
(native service) and the quadlet, and chown the host cache dir to the
container user via the :U volume option.
This commit is contained in:
2026-08-02 16:16:14 +02:00
parent cecbed79ea
commit 37962b2ba8
3 changed files with 21 additions and 3 deletions
+7 -2
View File
@@ -10,9 +10,14 @@ Image=docker.io/ducktors/turborepo-remote-cache:2.11.5
EnvironmentFile=/etc/turborepo-remote-cache/config.env
# Bind to loopback on the host; runners reach via host.containers.internal
PublishPort=127.0.0.1:3128:3000
Volume=/var/cache/turborepo-remote-cache:/app/cache:Z
# Override STORAGE_PATH inside the container to match the bind mount
# :U chowns the host dir to the container's "app" user on start
Volume=/var/cache/turborepo-remote-cache:/app/cache:Z,U
# Override STORAGE_PATH inside the container to match the bind mount.
# STORAGE_PATH_USE_TMP_FOLDER=false is required: by default the server
# joins STORAGE_PATH onto os.tmpdir() (even absolute paths) and writes
# to the ephemeral /tmp/app/cache instead of the bind mount.
Environment=STORAGE_PATH=/app/cache
Environment=STORAGE_PATH_USE_TMP_FOLDER=false
Environment=PORT=3000
Environment=HOST=0.0.0.0