๐ณ Docker Network Home Lab
Welcome to my Docker infrastructure documentation.
๐ Network Overview
graph TB
subgraph External
IN["๐ Internet"]
CF["โ๏ธ Cloudflare Tunnel"]
end
subgraph "๐ฅ๏ธ Docker Host"
RP["๐ Traefik Reverse Proxy"]
subgraph "๐ฏ Frontend Network"
NG["๐ Nginx"]
GRAF["๐ Grafana"]
end
subgraph "โ๏ธ Backend Network"
API["๐ API Service"]
DB["๐๏ธ PostgreSQL"]
REDIS["โก Redis Cache"]
end
subgraph "๐ก Monitoring Network"
PROM["๐ Prometheus"]
NODE["๐ฅ๏ธ Node Exporter"]
CADV["๐ฆ cAdvisor"]
end
end
IN --> CF
CF --> RP
RP --> NG
RP --> API
RP --> GRAF
API --> DB
API --> REDIS
PROM --> NODE
PROM --> CADV
GRAF --> PROM
style IN fill:#1a1040,stroke:#ff00ff,stroke-width:3px,color:#fff
style CF fill:#1a1a4e,stroke:#00ffff,stroke-width:3px,color:#fff
style RP fill:#0f0f2d,stroke:#ff00ff,stroke-width:3px,color:#fff
style NG fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
style GRAF fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
style API fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
style DB fill:#0f0f2d,stroke:#ff00ff,stroke-width:2px,color:#fff
style REDIS fill:#0f0f2d,stroke:#ff00ff,stroke-width:2px,color:#fff
style PROM fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
style NODE fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
style CADV fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff
๐ฎ Network Configuration
| ๐ Network | ๐ก Subnet | ๐ช Gateway | ๐ฏ Purpose |
|---|---|---|---|
| frontend | 172.20.0.0/16 |
172.20.0.1 |
Public services |
| backend | 172.21.0.0/16 |
172.21.0.1 |
Databases/Cache |
| monitoring | 172.22.0.0/16 |
172.22.0.1 |
Observability |
โก Docker Commands
```bash
๐ List all networks
docker network ls
๐ Inspect network details
docker network inspect frontend
๐ Create new network
docker network create โdriver bridge โsubnet 172.23.0.0/16 new-network
๐ Connect container to network
docker network connect frontend container-name