Deployments, auto deploy, service routes, live logs, metrics and a terminal #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/deployments"
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?
Adds four Dokploy-style features to the panel.
Deployments
Auto deploy
POST /hooks/<app>accepts Forgejo, Gitea and GitHub HMAC signatures, or the secret as a token. Pushes to other branches are ignored.Domains without port juggling
8080, orweb:8080when the compose file has several services.127.0.0.1port in 18000–19999, andpanelctlpublishes it through a generated.panel-ports.yamloverride. Compose files no longer needports:.host:portroutes keep working unchanged.Logs, monitoring and terminal
podman stats.podman execover a WebSocket, using xterm.js). The Nix package bundles xterm.js, pinned by hash.Security: the webhook route skips Authelia. The NixOS module sends
/hooks/*straight to the panel. Caddy matches the cleaned path but forwards the original, soPOST /apps/x/remove/../../../hooks/xwould reach "remove app x" without a login. I reproduced that with a real Caddy. Two fixes:X-Panel-Hook, and the panel accepts onlyPOST /hooks/<name>with it..and..path segments, including encoded ones.With a real Caddy in front, the traversal variants now get 400 and 403, and the app survives. The option
services.reudy-panel.webhooks = falseturns the route off.Tests. I didn't have a real Podman here, so these ran against fake
podman/podman-composescripts:nix flake checkpasses, and the package builds with the vendored xterm.js and PyYAML. The built package served the UI and deployed an app, and thevpsconfig evaluates with this branch.Not tested on the server: real
podman statsoutput (it's parsed defensively), andpodman exec -itthrough a real container.Deploying: after merging, on the VPS:
cd ~/nixos && nix flake update panel && nixos-rebuild switch --flake .#vps --sudo. For Forgejo to register webhooks, the stored token needs write access to repositories.🤖 Generated with Claude Code
https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
Deployments: deploy, restart and git sync now run in the background, one at a time per app (a newer request replaces a queued one). Each run is recorded in SQLite with its log, streamed to the UI while it runs, and can be cancelled. Any earlier deployment can be deployed again, which rolls back to its commit, or to its saved compose file for compose apps. Auto deploy: POST /hooks/<app>, verified with the app's secret (Forgejo, Gitea and GitHub HMAC signatures, or the secret as a token for CI). With a Forgejo token stored, the panel adds the webhook to the repository itself. The NixOS module routes /hooks/* past Authelia. Caddy matches the cleaned path but forwards the original, so the panel refuses dot segments and only accepts webhook deliveries from that route (tagged with X-Panel-Hook). Domains: a route can point at a compose service's container port ("web:8080"). The panel picks a free 127.0.0.1 port and panelctl publishes it through a generated .panel-ports.yaml override, so compose files need no ports: section. Existing host:port upstreams keep working. Logs stream live over server-sent events, with service and text filters. A sampler keeps an hour of CPU and memory per container for the new Monitoring tab. The Terminal tab opens `podman exec` in a container over a WebSocket, using xterm.js bundled by the Nix package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf