带有监控、警报和最佳实践建议的实时 Docker 架构可视化工具
Read this in other languages: Español
Real-time Docker architecture visualizer. Displays services, connections and metrics from all your Docker Compose projects in an interactive dashboard.
"Build what docker doesn't have the vision to build, and that Railway won't bring to local, without having to become either."
— u/dashingsauce, on the launch thread
Existing tools show you numbers. ContainerFlow also:
restart: unless-stopped. Teaches good practices while you use itdocker stats. Your Postgres DB with hot buffers no longer reports a false 98%ALLOWED_PATHS env var for shared servers: see everything, only touch what's yoursNo clone needed. Pull the prebuilt image from GHCR:
curl -O https://raw.githubusercontent.com/RGJorge/ContainerFlow/main/docker-compose.yml
curl -O https://raw.githubusercontent.com/RGJorge/ContainerFlow/main/.env.example
cp .env.example .env
docker compose up -dOpen http://localhost:9470. Done.
If you cloned the repo and want to build locally (e.g. you modified the code):
git clone https://github.com/RGJorge/containerflow.git
cd containerflow
cp .env.example .env
# In .env, uncomment: COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml
docker compose up -d --buildFor native development (hot reload, no Docker): bun install && bun run dev.
/var/run/docker.sock)git clone https://github.com/RGJorge/containerflow.git
cd containerflow
bun installCopy the example file and edit:
cp .env.example .envAvailable variables:
| Variable | Default | Description |
|---|---|---|
PORT |
9470 |
Server port |
AUTH_TOKEN |
(empty) | Auth token. Empty = no auth, localhost only. Set = auth enabled, remote access allowed |
DATA_DIR |
./data |
Persistence directory: stats history (.dockerflow-stats.db), Discord config (.dockerflow-discord.json), per-container overrides (.dockerflow-container-settings.json), node positions and env file overrides. Auto-created on startup. In Docker, mounted at /app/data via the containerflow-data volume. |
HOST_PROJECTS_DIR |
(empty) | Additional path to mount so rebuild/remove can read compose files outside the defaults (/home, /opt, /srv, /root). Only needed for non-standard paths (e.g. /data/apps). |
ALLOWED_PATHS |
(empty) | Empty = everything actionable (permissive mode). With values = :-separated list of prefixes; only containers whose compose file lives under one of these paths can execute actions, the rest appear with a lock icon. See Security section. |
ALLOW_NON_COMPOSE |
false |
Only applies when ALLOWED_PATHS is active. If ALLOWED_PATHS is empty, this has no effect. When applicable: false blocks actions on non-compose containers (started with docker run directly); true allows them. |
bun run devOpens http://localhost:9420 (Vite dev with hot reload, proxies API to the backend on port 9470).
docker compose up -dOpens http://localhost:9470.
bun run build
bun run startOpens http://localhost:9470.
# View ALL Docker containers
bun run start -- --all
# View only specific projects
bun run start -- --projects=my-project,another-project
# Auto-detect from current directory
bun run startdocker exec) from the DetailPanel with output, no SSH or external terminal neededALLOWED_PATHS env var lets you restrict actions to containers whose compose file lives under specific paths. Ideal for shared servers: see everything, only touch what's yours. Containers outside the paths appear with a lock iconunless-stopped recommended). Helps users adopt good Docker practices without having to remember themContainerFlow doesn't just monitor: it detects sub-optimal Docker configuration and flags it with an amber banner in the affected container's DetailPanel. The idea is to help you adopt good practices without having to remember them.
| Detection | Why it matters | How it shows in ContainerFlow |
|---|---|---|
No memory_limit |
A container without a RAM cap can hog all host memory and take down everything else (including the daemon). The kernel does random OOM kills under pressure. | Banner: "No memory limit configured in Docker" |
No cpu_quota |
Similar to memory — a container can saturate all cores. Critical in multi-tenant, degrades host responsiveness in single-tenant. | Banner: "No CPU limit configured in Docker" |
restart: no or empty |
If the process dies, the container stays dead. In production you almost always want unless-stopped (restarts on crash, does NOT if you stopped it manually). |
Banner: "Restart policy: none — the container will not restart automatically if stopped" |
# docker-compose.yml — best practices
services:
my-app:
image: my-app:latest
restart: unless-stopped # ← restarts on crash, respects manual stops
deploy:
resources:
limits:
cpus: "0.5" # ← maximum half a core
memory: 256M # ← absolute cap, prevents host OOM
healthcheck: # ← detects "alive but broken" apps
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30sMost Docker tutorials don't mention these settings because "it works without them". But in production they're the difference between:
ContainerFlow reminds you visually each time you open the DetailPanel — not spam, just educational context where it applies.
HEALTHCHECK and suggest a contextual one based on the image (postgres → pg_isready, redis → redis-cli ping, http app → curl /health, etc.)tmpfs or binds to an ephemeral directory:latest tag: warning when a container uses image:latest (not reproducible)ContainerFlow keeps a metrics history and notifies important events to Discord.
.dockerflow-stats.db) on every Docker polling cycle (~3s)1h, 6h, 24h, 7d with aggregated buckets (30s / 60s / 5min / 30min) for performanceVACUUMGET /api/stats/history?range=1h — history of all servicesGET /api/stats/history/:uid?range=1h — history of a specific serviceMonitoringPage.tsx) shows a card per service with CPU and MEM sparklines, current value, average and threshold line. Each card can be expanded for a larger chart, and filtered by project and/or service (filters are cumulative).Configured from Settings → Discord Notifications. Requires a webhook URL starting with https://discord.com/api/webhooks/.
Supported events (each can be toggled on/off):
| Event | When it fires |
|---|---|
| Container State Changes | start, stop, die (crash), restart, health_status. stop/die events are debounced 15s to detect restarts and send a single "Container Restarted" message instead of separate stop+start |
| Resource Alerts | A container's CPU or memory exceeds the threshold (global or per-container) |
| UI Actions | Manual action triggered from the panel: start/stop/restart/rebuild/remove |
| Action Errors | An action executed from the UI failed (includes the error message) |
Anti-spam mechanisms:
5 min, configurable 1-60)5 min)429, respects Retry-After and retries暂无开放 Issues,或尚未同步最近议题。