Homepage: one service card
Homelab homepages often turn into crowded link lists, making quick service access a real problem. This note covers surfacing a single service card with docker-compose, health checks and a minimal config. Exact command set, common traps and a verification workflow follow.
Why one card
For a lone service a full dashboard (homer, UptimeKuma, CasaOS) adds unnecessary resource overhead and extra entry points. One card gives:
- Instant access from any point on the network
- Configuration kept inside a single compose file
- No extra agents required for one container
In practice Lead DevOps teams use this pattern for internal tools, databases or APIs reachable from the network but where spinning up full monitoring isn’t justified.
If you need a list of several services consider homer or similar, but for a single instance a minimal compose + static card file is more reliable and lighter on memory.
Preparing the compose file
Create a minimal docker-compose.yml for a Python service (FastAPI example, any container image works). The file lives in ~/service-card/:
Apply the configuration:
The --build flag rebuilds the image when code changes. On a plain start docker compose up -d is sufficient.
Check status:
Config and paths setup
To make the card on the homepage point to the right address, set href in the local config.yaml (or equivalent). Example structure:
Here href is built from the host and port defined in compose (8080 maps to internal 8000). If the host changes, just update the address in the config – the container keeps running without restart.
A common mistake is setting href to a port already occupied by another container on the host. Before changing check docker compose port app 8000 and confirm the external port is free.
Mount the config into the container if needed:
After changes restart the service:
Workability check scenario
After the service comes up verify accessibility with curl and the health check:
If the healthy flag in docker compose ps shows healthy the check passed. Otherwise proceed to typical failure diagnostics.
Typical breakdown solution
The following table lists three frequent failure scenarios and their resolution:
| Problem | Cause | Fix |
|---|---|---|
Port 8080 already used by another container | Port mapping conflict on the host | docker compose down → change ports in compose.yml to a free port (e.g., 8081) → docker compose up -d |
curl returns Connection refused | Container failed to start or crashed | docker compose logs app → fix command or environment error → docker compose up -d --force-recreate app |
| Health check times out | Service starts slowly or /health endpoint missing | Increase start_period in healthcheck or replace with curl -f http://localhost:8000/docs if docs are available |
| If after fixing the port the service won’t start, check volume permissions with chown -R 1000:1000 ./app (replace UID/GID as needed) and repeat docker compose up -d. |
Conclusion and findings
A single-service card built on docker-compose offers a controlled, lightweight way to reach the exact application without extra functionality. Key benefits:
- Full state resides in repo files (
compose.yml,config.yaml, app code) - Service health is auto-checked via the built-in
healthcheck - Typical issues (port conflicts, env mistakes, permission errors) get resolved in one or two commands, no image rebuild needed
hrefin the external config lets you change the entry point without rebuilding the container
For homelab projects where response speed and minimal resource use matter, this approach wins over heavy dashboards. Should more services be required later the same compose file can be extended while keeping structure and check logic intact.