You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#48 (ccas serve lifecycle) listed a systemd user-unit template as an explicit optional follow-up:
Optional in this issue (can be follow-up): ship a contrib/ccas.service systemd user-unit template.
It was not shipped with #48 (which delivered serve / serve --detach / stop). Capturing it here so it isn't silently dropped.
What
Ship contrib/ccas.service — a systemd user unit for running the server always-on locally, plus a short README install snippet.
Because #48 made foreground the default and the build already emits a dedicated foreground entry (ccas-server), the unit is a plain Type=simple wrapper — no Type=forking/PIDFile dance, no --detach:
# ~/.config/systemd/user/ccas.service[Unit]Description=CCAS backend server
After=network-online.target
[Service]Type=simple
ExecStart=%h/.local/bin/ccas-server
Restart=on-failure
# Runtime config from the environment (the binary does not read .env):Environment=SERVER_PORT=8080
EnvironmentFile=%h/.config/ccas/ccas.env
[Install]WantedBy=default.target
README install snippet under "Running the server detached".
Priority
Low — convenience for a local always-on server; manual serve --detach / stop already cover the common case, and hosted deployment is tracked separately at #60.
Reference
Deferred from #48; tracked under epic #40 (CLI v0).
Context
#48 (
ccas servelifecycle) listed a systemd user-unit template as an explicit optional follow-up:It was not shipped with #48 (which delivered
serve/serve --detach/stop). Capturing it here so it isn't silently dropped.What
Ship
contrib/ccas.service— a systemd user unit for running the server always-on locally, plus a short README install snippet.Because #48 made foreground the default and the build already emits a dedicated foreground entry (
ccas-server), the unit is a plainType=simplewrapper — noType=forking/PIDFile dance, no--detach:Install:
systemctl --user enable --now ccas.service(+loginctl enable-linger $USERfor boot-without-login).Notes
ccas-server(foreground) — NOTccas serve --detach. systemd owns the lifecycle;serve --detach/stopremain the manual path.CCAS_CONTACT_EMAIL,DATABASE_URLorDB_*) viaEnvironmentFile, since the binary reads the process env only.SERVER_HOST=127.0.0.1); fine for a local unit.Scope
contrib/ccas.servicetemplate.Priority
Low — convenience for a local always-on server; manual
serve --detach/stopalready cover the common case, and hosted deployment is tracked separately at #60.Reference
Deferred from #48; tracked under epic #40 (CLI v0).