Static site template — z3k platform
Find a file Use this template
Arthur Zinck b2b3ef42c1
Some checks failed
build-image / build (push) Failing after 2s
ci: preview build on pull requests
2026-07-27 11:51:41 +00:00
.forgejo/workflows ci: preview build on pull requests 2026-07-27 11:51:41 +00:00
public feat: static template — public/style.css 2026-07-26 20:16:02 +00:00
.dockerignore feat: static template — .dockerignore 2026-07-26 20:15:59 +00:00
Caddyfile feat: static template — Caddyfile 2026-07-26 20:16:00 +00:00
Dockerfile feat: platform base images (z3k-images) 2026-07-27 07:13:50 +00:00
README.md feat: static template — README.md 2026-07-26 20:15:58 +00:00

static

Static site template for the z3k platform.

Usage

  1. Drop your HTML, CSS, JS and assets into public/ — whatever is there is served as-is, no build step.
  2. Push to main. The platform builds the image and deploys it.

Runtime

  • Listens on PORT (default 8080).
  • GET /health returns 200 (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 off disable it anyway.
  • Binds :{$PORT} (>1024), so no root or extra capabilities are needed; the Dockerfile sets a numeric non-root USER.

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.