This repo ran its own separate copy of Postgres, Zitadel and SeaweedFS, none of which are actually wired into the Go backend yet (auth and file storage are still unchecked TODOs in the README). Removed that unused duplicate stack (deploy/docker-compose.dev.yml, deploy/postgres-init/) in favor of the shared Infrastructure repo also used by Musify and Ping. make dev-infra now brings up Infrastructure instead, and backend/.env.example points at its ports (Postgres on dockermanager_db, Zitadel, SeaweedFS) as placeholders for when those features are implemented.
76 lines
2.7 KiB
Markdown
76 lines
2.7 KiB
Markdown
# Docker Manager
|
|
|
|
A web app for keeping track of Docker containers running on a home server
|
|
from a single dashboard, instead of jumping between SSH sessions and `docker
|
|
ps`. Built for personal infrastructure: a handful of self-hosted services and
|
|
side projects running on one box.
|
|
|
|
## What it does right now
|
|
|
|
- Lists every container on the local Docker host, running or stopped, with
|
|
its image, state and status.
|
|
- A small health check endpoint so the API itself can be monitored.
|
|
|
|
This is early: a single host, read-only, no login yet. The plan is to grow
|
|
it into something that can watch several hosts, show logs and a live
|
|
console, and act on containers (start, stop, restart) behind proper
|
|
authentication.
|
|
|
|
## Stack
|
|
|
|
**Backend**: Go, using `chi` for routing, the official Docker SDK to talk to
|
|
the engine, `pgx` for Postgres and `zitadel/oidc` and `coder/websocket` for
|
|
what's coming next (auth and live log streaming).
|
|
|
|
**Frontend**: SvelteKit with Tailwind CSS v4.
|
|
|
|
**Auth** (planned): Zitadel, with the backend-for-frontend pattern so tokens
|
|
never reach the browser.
|
|
|
|
**Database**: PostgreSQL, for hosts, tracked services and an audit log.
|
|
|
|
**File storage** (planned): SeaweedFS, S3 compatible.
|
|
|
|
Postgres, Zitadel and SeaweedFS are not run by this repo: they're shared
|
|
infrastructure that lives in the separate `Infrastructure` git repository,
|
|
used by other projects too. This repo has no infrastructure containers of
|
|
its own. The Go API and the SvelteKit app run directly on the host for fast
|
|
iteration.
|
|
|
|
## Project layout
|
|
|
|
```
|
|
backend/ Go API: HTTP router, config, the Docker connector, SQL migrations
|
|
frontend/ SvelteKit app
|
|
```
|
|
|
|
## Running it locally
|
|
|
|
```bash
|
|
make dev-infra
|
|
cp backend/.env.example backend/.env
|
|
make backend
|
|
make frontend
|
|
```
|
|
|
|
`make dev-infra` brings up the shared `Infrastructure` stack (Postgres,
|
|
Zitadel, SeaweedFS). Then `make backend` starts the API on
|
|
`http://localhost:8090` and `make frontend` starts the frontend on
|
|
`http://localhost:5173`. The API port is 8090 instead of the usual 8080
|
|
because that one is often already taken by something else on the same
|
|
machine.
|
|
|
|
Useful endpoints while developing: `/healthz` and `/api/containers`.
|
|
|
|
## Status
|
|
|
|
- [x] Monorepo layout (`backend/`, `frontend/`)
|
|
- [x] Go backend: `chi` router, env based config, health check
|
|
- [x] `HostConnector` / `LocalConnector`: container listing via the Docker SDK
|
|
- [x] Frontend consuming `/api/containers`
|
|
- [x] Dev infrastructure (Postgres, Zitadel, SeaweedFS) via the shared `Infrastructure` repo
|
|
- [x] Initial schema (`hosts`, `services`, `audit_log`)
|
|
- [ ] OIDC login against Zitadel (BFF pattern)
|
|
- [ ] Persisting hosts and services through the backend
|
|
- [ ] Container actions (start/stop/restart) and live logs
|