Summary
Add the ability to start, stop, restart containers and view live container logs from the dashboard.
Problem
The Docker collector is currently read-only. Users must SSH into the server to manage containers or view their logs.
Implementation
Backend
- New API endpoints:
POST /api/v1/docker/containers/:id/start
POST /api/v1/docker/containers/:id/stop
POST /api/v1/docker/containers/:id/restart
GET /api/v1/docker/containers/:id — full container inspect (env, ports, volumes, resource limits)
GET /api/v1/docker/containers/:id/logs?tail=200&follow=true — SSE or WebSocket stream for live logs
- Extend
internal/collectors/docker.go with action methods using Docker API (/containers/:id/start, /stop, /restart, /json, /logs)
Frontend
- Container row click opens a detail panel/drawer
- Detail panel shows: full config, env vars, port mappings, volumes, resource limits
- Action buttons: Start, Stop, Restart with confirmation dialog
- Live log viewer: scrollable, auto-follow, with search/filter
- Color-coded log output (stderr in red)
Security consideration
Container management is a privileged operation. Should require admin role (ties into #8 user management).
Files to create/modify
internal/collectors/docker.go — action methods
internal/server/server.go — new routes
- New
frontend/src/components/ContainerDetail.svelte
frontend/src/components/ContainerTable.svelte — make rows clickable
Summary
Add the ability to start, stop, restart containers and view live container logs from the dashboard.
Problem
The Docker collector is currently read-only. Users must SSH into the server to manage containers or view their logs.
Implementation
Backend
POST /api/v1/docker/containers/:id/startPOST /api/v1/docker/containers/:id/stopPOST /api/v1/docker/containers/:id/restartGET /api/v1/docker/containers/:id— full container inspect (env, ports, volumes, resource limits)GET /api/v1/docker/containers/:id/logs?tail=200&follow=true— SSE or WebSocket stream for live logsinternal/collectors/docker.gowith action methods using Docker API (/containers/:id/start,/stop,/restart,/json,/logs)Frontend
Security consideration
Container management is a privileged operation. Should require admin role (ties into #8 user management).
Files to create/modify
internal/collectors/docker.go— action methodsinternal/server/server.go— new routesfrontend/src/components/ContainerDetail.sveltefrontend/src/components/ContainerTable.svelte— make rows clickable