fabro/docker/entrypoint.sh
Bryan Helmkamp a00abd8970
feat(docker): reorganize compose, add Caddy reverse proxy for prod
Move docker-compose.yaml to the repo root and add docker-compose.prod.yaml
that stands up a Caddy 2 sidecar on 80/443 proxying to the fabro service
on 32276 (the CLI's default port). Auto-HTTPS is handled by Caddy when
FABRO_DOMAIN is set; certs persist in named volumes.

Switch the container's internal listener from 80 to 32276, which lets us
drop libcap2-bin and the CAP_NET_BIND_SERVICE file capability.
2026-04-18 00:33:11 -04:00

11 lines
258 B
Bash
Executable file

#!/bin/sh
set -eu
# When started as root (the default), ensure the storage volume is writable
# by the unprivileged fabro user, then drop privileges.
if [ "$(id -u)" = 0 ]; then
chown fabro:fabro /storage
exec runuser -u fabro -- "$@"
fi
exec "$@"