No preamble. You have a Docker Compose stack and you want to monitor it. Here’s how, in 2 minutes flat.
Step 1: Add Maintenant to your stack
Open your docker-compose.yml and add this service:
services:
# ... your existing services ...
maintenant:
image: ghcr.io/kolapsis/maintenant:latest
ports:
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- maintenant-data:/data
environment:
MAINTENANT_DB: "/data/maintenant.db"
restart: unless-stopped
volumes:
maintenant-data:
Step 2: Launch
docker compose up -d maintenant
Step 3: Open the dashboard
Head to http://your-server:8080. All your containers are already there, with their state, uptime, and health checks.
Time elapsed: about 30 seconds.
Bonus: add HTTP endpoints
Want to verify that your API is responding correctly? Add labels to your services:
services:
api:
image: myapp:latest
labels:
maintenant.endpoint.http: "http://api:3000/health"
maintenant.endpoint.interval: "15s"
postgres:
image: postgres:16
labels:
maintenant.endpoint.tcp: "postgres:5432"
Run docker compose up -d again and the endpoints appear in the dashboard.
Bonus: add Discord alerts
Set up a Discord webhook in the Maintenant dashboard, and get notified whenever something goes wrong. Container crash, endpoint down, expiring certificate – everything goes through the same channel.
Behind a reverse proxy?
If you use Traefik (and you should), add the usual labels:
services:
maintenant:
image: ghcr.io/kolapsis/maintenant:latest
labels:
traefik.enable: "true"
traefik.http.routers.maintenant.rule: "Host(`now.example.com`)"
traefik.http.routers.maintenant.middlewares: "authelia@docker"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- maintenant-data:/data
environment:
MAINTENANT_ADDR: "0.0.0.0:8080"
MAINTENANT_DB: "/data/maintenant.db"
MAINTENANT_BASE_URL: "https://now.example.com"
Maintenant is protected by your authentication middleware (Authelia, Authentik, OAuth2 Proxy), just like the rest of your services.
That’s it. Your stack is monitored.