Static site template — z3k platform
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| public | ||
| .dockerignore | ||
| Caddyfile | ||
| Dockerfile | ||
| README.md | ||
static
Static site template for the z3k platform.
Usage
- Drop your HTML, CSS, JS and assets into
public/— whatever is there is served as-is, no build step. - Push to
main. The platform builds the image and deploys it.
Runtime
- Listens on
PORT(default8080). GET /healthreturns200(used by the platform's probes).
Why Caddy?
The image is the official caddy:2-alpine, chosen because it is trivially
compatible with the platform's pod security policy (runAsNonRoot +
readOnlyRootFilesystem):
- Single static binary, no writable temp/cache paths required to serve files.
- The only state Caddy ever writes (config autosave, local data) follows
XDG_CONFIG_HOME/XDG_DATA_HOME, which the Dockerfile points at/tmp— the one writable mount.admin off+persist_config offdisable it anyway. - Binds
:{$PORT}(>1024), so no root or extra capabilities are needed; the Dockerfile sets a numeric non-rootUSER.
nginxinc/nginx-unprivileged was the runner-up but needs several writable
temp directories (client_body, proxy, etc.) relocated to /tmp via config
surgery to survive a read-only rootfs — more moving parts for zero gain here.
Bitnami images are not used on this platform.