Files
nixos-core/dashboard/main.py
T
kiskaadee fc55cc7f2a feat: initialize Arch-traefik-hub core with automated DNS-01 SSL
- Configure Traefik v3 with Dynu provider for Let's Encrypt challenges
- Implement up.sh for automated network setup and service deployment
- Scaffold services (Dozzle, Gitea, Ollama) with standardized labels
- Initialize FastAPI dashboard with Docker SDK integration
- Update README with new architecture and local domain mapping
2026-04-20 18:52:40 -05:00

27 lines
853 B
Python

import docker
from fastapi import FastAPI
app = FastAPI()
client = docker.from_env()
@app.get("/api/services")
def get_services():
services = []
# Filter for containers in our specific network
for container in client.containers.list(all=True):
networks = container.attrs["NetworkSettings"]["Networks"]
if "proxy-net" in networks:
services.append(
{
"name": container.name,
"status": container.status, # running, exited, etc.
"image": container.image.tags[0] if container.image.tags else "N/A",
"hostname": container.labels.get(
f"traefik.http.routers.{container.name}.rule",
"No Hostname",
),
}
)
return services