feat(hub): implement native in-app container updates

Introduces the ability for registered users to trigger Beszel container updates directly from the web interface.

- Added `app_update` logic to the hub to pull the latest image from GHCR and recreate the container.
- Implemented `/api/beszel/update` and `/api/beszel/update/apply` endpoints.
- Added a new `AppUpdatePanel` in the settings UI to check for and apply updates.
- Added update notifications in the navbar and settings.
- Updated `docker-compose.yml` and `README.md` to include the required Docker socket mount for update functionality.
- Added a new public status page route that bypasses authentication.
- Refactored several TypeScript interfaces to replace `any` with `unknown` or specific types for better type safety.
- Updated localization files to support new update-related strings.
This commit is contained in:
Tomas Dvorak
2026-04-30 14:38:13 +02:00
parent 67254f89a9
commit 7727be166b
63 changed files with 582907 additions and 636 deletions
+9
View File
@@ -20,6 +20,9 @@ services:
- "${BESZEL_PORT:-8090}:8090"
volumes:
- beszel_data:/beszel_data
# Enables native in-app updates from ghcr.io/dvorinka/beszel:latest.
# Any registered Beszel user can trigger this update action.
- /var/run/docker.sock:/var/run/docker.sock
environment:
APP_URL: "${APP_URL:-http://localhost:8090}"
PUBLIC_URL: "${PUBLIC_URL:-}"
@@ -62,6 +65,12 @@ The hub will be available at `http://localhost:8090` by default. For Dokploy or
Agents run on separate hosts and connect to the hub. See [Adding Agents](#adding-agents) below.
### Native App Updates
Beszel checks `ghcr.io/dvorinka/beszel:latest` from inside the app and shows update status in Settings > General. When the Docker socket is mounted, any registered user can start an in-app update. Beszel pulls the latest image, recreates the running container with the same Docker configuration, and restarts itself automatically.
The Docker socket gives Beszel control over Docker on the host. Keep registration limited to trusted users.
### Environment Variables
| Variable | Default | Description |