# catcrafts-server — the server-rendering backend. # # Install to /etc/systemd/system/catcrafts-server.service, then: # systemctl daemon-reload && systemctl enable --now catcrafts-server # # Layout this expects on the host: # /srv/catcrafts.net/ the wasm bundle + static assets (Caddy's root, # and the rsync --delete target from CI) # /srv/catcrafts-app/ the server binary and content/, deployed by CI # catcrafts-server # content/{projects,posts}.json # /var/lib/catcrafts/ runtime state — the SQLite database and keys # once the shop exists. NEVER in the webroot: # that directory is both publicly served and # wiped by `rsync --delete` on every deploy. [Unit] Description=catcrafts.net server-rendering backend Documentation=https://forgejo.catcrafts.net/Catcrafts/catcrafts.net After=network-online.target Wants=network-online.target # Caddy proxies to this; if it is down Caddy falls back to the static shell, so # there is no hard ordering requirement between them. [Service] Type=simple User=catcrafts Group=catcrafts WorkingDirectory=/srv/catcrafts-app # --webroot points at Caddy's root so the boot