Drop the PORT=3000 override from the quadlet so the container listens on PORT from config.env like the native service, and publish 127.0.0.1:3128:3128. Move PublishPort into a %config(noreplace) quadlet drop-in, /etc/containers/systemd/turborepo-remote-cache.container.d/ publish-port.conf, so hosts can change the host binding without an untracked override. Document in config.env that the container overrides HOST and that the listen address belongs in PublishPort.
29 lines
1.0 KiB
INI
29 lines
1.0 KiB
INI
[Unit]
|
|
Description=Turborepo Remote Cache (Podman quadlet)
|
|
Documentation=https://github.com/ducktors/turborepo-remote-cache
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Container]
|
|
ContainerName=turborepo-remote-cache
|
|
Image=docker.io/ducktors/turborepo-remote-cache:2.14.1
|
|
EnvironmentFile=/etc/turborepo-remote-cache/config.env
|
|
# PublishPort lives in
|
|
# /etc/containers/systemd/turborepo-remote-cache.container.d/publish-port.conf
|
|
# :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=HOST=0.0.0.0
|
|
|
|
[Service]
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|