Manage multi-file Docker Compose deployments on a Raspberry Pi home lab server.
Manage the multi-file Docker Compose deployment across seven stack directories on a Raspberry Pi 5 home lab. Covers selective deployment, service updates, image pulls, troubleshooting, and understanding the split-stack architecture.
homelab_sshTest)Optional:
homelab_sshTest./opt/homelab/docker/:
base/ -- Portainer, Homepage, Watchtowermonitoring/ -- Prometheus, Grafana, node_exporter, Uptime Kuma, Alertmanagernetwork/ -- AdGuard Home, Nginx Proxy Manager, Tailscaleapps/ -- Vaultwarden, Stirling PDF, Code Serversecurity/ -- Crowdsec, fail2ban sidecar configsstorage/ -- Syncthing, Samba configstools/ -- Ntfy, Speedtest Trackerhomelab_composePs with the stack path to see
running containers, health status, and port mappings.homelab_composeUp with the stack pathhomelab_composeDown with the stack pathhomelab_composePull then homelab_composeUp with
--force-recreate to apply new imageshomelab_serviceRestart with the
service namehomelab_composePs again to confirm the desired
state. Optionally call homelab_serviceHealth for health-checked services.Stack directory layout:
/opt/homelab/docker/
base/docker-compose.yml # Portainer, Homepage, Watchtower
monitoring/docker-compose.yml # Prometheus, Grafana, node_exporter, Uptime Kuma
network/docker-compose.yml # AdGuard Home, Nginx Proxy Manager
apps/docker-compose.yml # Vaultwarden, Stirling PDF, Code Server
security/docker-compose.yml # Crowdsec, fail2ban
storage/docker-compose.yml # Syncthing
tools/docker-compose.yml # Ntfy, Speedtest Tracker
Service-to-stack mapping (quick reference):
monitoringnetworkappsbasetoolsstorageUser: "Update Grafana to the latest version"
Assistant actions:
homelab_sshTesthomelab_composePull with stack path /opt/homelab/docker/monitoringhomelab_composeUp with stack path /opt/homelab/docker/monitoringhomelab_composePs with stack path /opt/homelab/docker/monitoringResponse:
Pulled latest images for the monitoring stack. Grafana was updated from 11.3.0 to 11.4.1. All 4 containers in the monitoring stack are running and healthy.
User: "Bring down the tools stack"
Assistant actions:
homelab_composeDown with stack path /opt/homelab/docker/toolshomelab_composePs to confirmResponse:
Tools stack stopped. Ntfy and Speedtest Tracker containers removed. Other stacks are unaffected.
| Tool | Purpose |
|---|---|
homelab_sshTest | Validate SSH before compose operations |
homelab_composeUp | Start or recreate containers in a stack |
homelab_composeDown | Stop and remove containers in a stack |
homelab_composePull | Pull latest images for a stack |
homelab_composePs | List container status for a stack |
homelab_serviceRestart | Restart an individual service by name |
homelab_serviceHealth | Check health endpoint of a specific service |
homelab_serviceLogs | Retrieve recent logs for a service |
homelab_composePull on every
stack simultaneously. The Pi has limited bandwidth and disk I/O. Update one
stack at a time.monitoring stack depends on network
for DNS resolution and proxy. Do not take down network without considering
the impact on monitoring dashboards.homelab_composeUp with the --remove-orphans flag.homelab_composePs across
all stacks if a container exits immediately.linux/arm64. If a
pull fails or a container crashes on startup, check that the image provides an
ARM64 variant.homelab_diskUsage before large pull
operations. Docker images accumulate and the Pi's SD card or SSD can fill up.pi-system-management -- hardware health before and after deploymentsservice-monitoring -- verifying services are healthy post-deploymentnetwork-configuration -- proxy and DNS changes needed for new servicesbackup-recovery -- backing up volumes before destructive compose operations