Commit graph

29 commits

Author SHA1 Message Date
a3c730e1db Move all services from srazka.com to reudy.net
Renames every domain in the config: Caddy virtual hosts (auth, hello,
nextcloud, git, panel), the ACME contact email, Authelia's session cookie
domain / portal URL / default redirect and TOTP issuer, Nextcloud's
hostName and overwritehost, and Forgejo's DOMAIN (ROOT_URL and ssh clone
URLs follow from it; the panel picks them up via panel.nix). Panel docs and
examples updated too, and a README paragraph that had run together is
split again.

Requires DNS for auth/hello/nextcloud/git/panel.reudy.net (or a
*.reudy.net wildcard) pointing at the server before deploying.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
2026-09-27 15:32:49 +00:00
agent
c1ff6c8176 panel: Forgejo integration, ssh deploy key and per-app environment variables
Forgejo:
- panel.nix passes the local Forgejo's public, API and ssh URLs (derived
  from forgejo.nix) to panel-api.
- Settings dialog: connect a Forgejo access token (verified against
  /api/v1/user, stored 0600 in state/panel/forgejo-token).
- New-app dialog gets a Forgejo repository picker with search and a branch
  dropdown; private repos are cloned over https with the stored token, or
  over ssh with the deploy key when no token is connected. The app name and
  domain are filled in from the repository name.
- Commit and compare links in the Source tab point at Forgejo; cards show
  the provider ("Forgejo · main").

Git over ssh:
- ssh:// and git@host:owner/repo URLs are accepted; the panel generates an
  ed25519 deploy key in state/panel/ssh and uses it for clone/fetch
  (BatchMode, accept-new host keys). openssh added to the service path.
- Credential redaction only applies to http(s) URLs, so ssh usernames are
  kept; git errors now report the meaningful line instead of git's advice.

Environment variables:
- Stored per app in state/env/<app>.env (0600), outside the repo and stack.
- panelctl passes them to every compose command via env(1), so ${VAR}
  interpolation works; by default deploy/restart also generate a compose
  override listing the keys under every service's environment (values are
  read from compose's environment, never quoted into YAML).
- Environment tab (and a section in the new-app dialog) with .env paste
  import, hidden values, validation of names (reserved podman/compose vars
  rejected), hints for ${VAR}s the compose file uses but aren't set, and
  Save / Save & deploy. Removing an app deletes its variables.

The API still accepts the old source_type "github" / github_* fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
2026-09-26 22:52:09 +00:00
agent
76a1e09913 panel: redesign web UI and make syncing responsive
Web UI (panel/frontend/index.html) rewritten:
- Cards update in place from a single /status poll instead of being rebuilt
  on every action, so open tabs, unsaved compose/route edits, logs and the
  file browser position survive refreshes. Polling speeds up while an
  operation runs and pauses in background tabs; a header indicator shows
  when the panel last synced and detects an expired Authelia session.
- New-app dialog (starter / compose / git), suggested port and domain,
  proper confirm dialogs (the old "OK = keep volumes" remove prompt is gone),
  toasts, an activity drawer with operation output, overflow menu, search,
  status filters, keyboard shortcuts, deep links, dark mode and mobile layout.
- Tabs: overview (containers + routes), compose editor (dirty tracking,
  Ctrl+S), logs with follow, validated routes editor, file browser with
  drag-and-drop upload, backups, and a git source tab (deployed commit,
  check for updates, sync & deploy).

API (panel/panel-api.py):
- ThreadingHTTPServer so a long deploy no longer blocks every other request.
- Per-app operation lock; concurrent writes to a busy app return 409.
- GET /status: all apps, routes and container status in one request
  (statuses gathered in parallel); status reports running/partial/stopped.
- Git sync is fetch + hard reset instead of pull-or-reclone, keeps the stored
  token, reports before/after commits; GET /apps/<name>/repo[?fetch=1].
- Any http(s) git host (e.g. Forgejo), default branch detection, git
  timeouts, no credential prompts, tokens redacted from errors, and manifest
  values validated before being written into the bash-sourced manifest.

panelctl:
- flock around routes.caddy rewrites (util-linux added to the service path).
- deploy returns compose output so failures are visible in the UI.
- inspect-volumes no longer fails for apps without named podman volumes,
  which broke the file browser.

Docs: README/API.md updated; fixed outdated panelctl init examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
2026-09-26 22:17:07 +00:00
Jakub Dorfman
7fae1ed57e added path to routing 2026-05-20 01:07:37 +02:00
Jakub Dorfman
02b2909601 added support for multiple routes multiple ports 2026-05-20 00:21:25 +02:00
Jakub Dorfman
0e4e3308c1 fix: add --build flag to run_compose for deployment and restart commands
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 19:36:02 +02:00
Jakub Dorfman
559bae34a9 fix: reset leftover variables in cmd_list function
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 18:56:26 +02:00
Jakub Dorfman
ea0f99b442 feat: add repo_url to app data and update frontend to conditionally display Git Pull button
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 18:53:02 +02:00
Jakub Dorfman
57ace80ecd feat: enhance volume management with support for multiple volumes and improved API endpoints
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 23:43:17 +02:00
Jakub Dorfman
479d84bc27 feat: add volume management features including file upload, download, and clear actions
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 23:30:22 +02:00
Jakub Dorfman
8b42ea7e04 feat: add routing tab and fetch routing details for apps in frontend
fix: update compose commands to remove orphan containers in panelctl

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 23:20:49 +02:00
Jakub Dorfman
441b049e2b fix: remove unused maybe_reload_caddy function from panelctl.sh 2026-04-28 20:49:14 +02:00
Jakub Dorfman
d71e12b3dd fix: add systemd path and service for automatic Caddy reload on route changes 2026-04-28 20:42:12 +02:00
Jakub Dorfman
89da2f4d36 fix: implement logging function and replace echo statements with log calls
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 12:35:04 +02:00
Jakub Dorfman
da44b44468 fix: enhance caddy reload logic to use admin API and improve validation checks 2026-04-27 12:14:12 +02:00
Jakub Dorfman
47dbd52c25 fixed permission updates to route.caddy when removing container 2026-04-27 00:27:38 +02:00
Jakub Dorfman
e02c840d18 fixed permissions durring caddy conf render 2026-04-27 00:19:55 +02:00
Jakub Dorfman
15a40af87b feat: add initial implementation of the frontend panel with app management features
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:53:17 +02:00
Jakub Dorfman
64c5b573cf Update caddy reload command paths in configuration and panelctl scripts
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:31:31 +02:00
Jakub Dorfman
7072fc9a37 Refactor route removal in cmd_render_route and cmd_remove to use sed for block deletion
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:23:26 +02:00
Jakub Dorfman
be44b1a0f5 Ensure grep command in cmd_render_route does not fail if APP_ROUTE_FILE is missing
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:09:19 +02:00
Jakub Dorfman
dbec256b36 Enhance deployment logging in cmd_deploy function for better error tracking
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:06:03 +02:00
Jakub Dorfman
902bd7ee73 Improve error handling in deployment and stopping commands in panelctl.sh
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 22:58:09 +02:00
Jakub Dorfman
74fa920ba0 Update paths in configuration files to use /var/lib/containers instead of /home/reudy/containers
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 22:40:39 +02:00
Jakub Dorfman
17ac5953ae Refactor route handling in panelctl.sh and update caddy configuration for improved route management
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 20:41:56 +02:00
Jakub Dorfman
36664f243e Add sudo rules for reudy to allow NOPASSWD systemctl reload for caddy and update panelctl.sh to use docker.io for image reference
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 20:16:42 +02:00
Jakub Dorfman
b2822b3c69 Add runtime environment checks for Podman in panelctl script
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 19:58:50 +02:00
Jakub Dorfman
8f944aefcb Enhance panel-api with compose functionality and update podman integration
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 19:48:35 +02:00
Jakub Dorfman
c8ea1761ed Add panel-api and panelctl scripts for container management
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 19:42:30 +02:00