Deploy to n97-mini: systemd unit, nginx route, health check #5
Labels
No labels
area/api
area/bridge
area/db
area/docs
area/ops
area/web
kind/bug
kind/chore
kind/feature
kind/spike
prio/p0
prio/p1
prio/p2
prio/p3
status/blocked
status/decision
status/needs-info
type/question
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: sscoble/posts#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Without deployment, nothing is real. Per the
go-htmx-web-devskill, services run as systemd user units behind nginx atos.scoble.me/<service>/.What to do
cd ~/projects/posts && nix build && cp result/bin/posts ~/.local/bin/posts.~/.config/systemd/user/posts.service:Type=simpleExecStart=/home/sscoble/.local/bin/postsEnvironmentFile=/home/sscoble/.local/share/posts/secrets.envRestart=always,RestartSec=5WantedBy=default.target"/posts/" = { proxyPass = "http://127.0.0.1:8310/"; ... };to/etc/nixos/modules/meos-gateway.nixandnixos-rebuild switch.os.scoble.me/posts/api/healthzreturns 200 from outside.journalctl --user -u posts -fshows clean output, no panics on startup.Acceptance
systemctl --user status postsshowsactive (running).curl https://os.scoble.me/posts/api/healthzreturns 200 from any client.kill -9(systemd restarts in <5s).nixos-rebuild switch(the nginx route persists).Out of scope
Open questions for Scott
/posts/or a subdomain likeposts.os.scoble.me? Default: subpath. The Theo prompt doesn't specify, but a subpath is simpler and follows your existing convention.n97-minisystem flake (/etc/nixos) or keep the nginx override as a conf.d file for now? Default: conf.d for fast iteration, migrate to flake once stable.Closed — deployment already live ✅
Verified at c2325: systemd user unit active (22h uptime), port 8310, healthz returns 200. Restart=always configured. Closed by ticket dispatch system at cycle c2325.