retire-docker-app
Automates the teardown of Docker Compose services and removes related integrations like Traefik configurations.
Install
mkdir -p .claude/skills/retire-docker-app && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18514" && unzip -o skill.zip -d .claude/skills/retire-docker-app && rm skill.zipInstalls to .claude/skills/retire-docker-app
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Retire a Docker Compose app from the TrueNAS Apps repository following all repo conventions. Use when removing a service, decommissioning an app, tearing down a stack, or cleaning up a retired application.Key capabilities
- →Remove service directories and associated files
- →Clean up Traefik integration points
- →Remove DNS records for the retired app
- →Remove Gatus monitoring configurations
- →Update documentation files to reflect retirement
How it works
The skill identifies the app's integration footprint, performs pre-retirement steps on servers, deletes the service directory, and removes all associated configurations from Traefik, DNS, and Gatus. It then updates documentation and adds an entry to the retired services log.
Inputs & outputs
When to use retire-docker-app
- →Decommissioning a microservice
- →Tearing down a container stack
- →Cleaning up service configurations
About this skill
Retire a Docker Compose App
When to Use
- Removing a service that is no longer needed
- Decommissioning an app and cleaning up all integration points
- Replacing an app with an alternative (retire the old one)
Procedure
Before starting, identify the app's current integration footprint by searching for its name across the entire repo (compose files, Traefik config, DNS records, README, ARCHITECTURE docs, servers.yaml, Gatus config, etc.).
Step 1 — Pre-retirement (on each server the app runs on)
- Run
dccd.sh -R <app>(server-aware teardown) on each server, or let the auto-cleanup indccd.shhandle it on the next deploy after merge. - If the app was active in TrueNAS, remove its entry after containers are stopped.
Step 2 — Delete the service directory
Remove services/<app>/ — including compose.yaml, secret.sops.env, README.md, and any config/ directory.
Step 3 — Remove Traefik integration
- Traefik compose (
services/traefik/compose.yaml) — remove the app's frontend network from the traefik service'snetworks:list and the corresponding external network definition at the bottom of the file. - Traefik compose overrides — if the app appears in any
services/traefik/compose.<server>.yamloverride, remove it there too. - Traefik middlewares (
services/traefik/config/rules/middlewares.yml) — remove any app-specific middleware definitions (e.g. custom secure-headers). - Traefik middleware chains (
services/traefik/config/rules/middlewares-chains.yml) — remove any app-specific chain definitions.
Step 4 — Remove DNS records
Remove the app's subdomain entry from services/adguard/config/unbound/conf.d/a-records.conf.
Step 5 — Remove Gatus monitoring
Remove any health-check endpoints for the app from services/gatus/config/config.yaml.
Step 6 — Update documentation
Remove the app from these files (keep remaining tables alphabetically sorted):
| File | What to remove |
|---|---|
README.md | Apps table row, dataset list entry |
docs/index.md | Keep in sync with README.md |
docs/ARCHITECTURE.md | Init container table entries, shared env references, app-specific sections |
docs/INFRASTRUCTURE.md | UID/GID table entries, media/storage references, app-specific sections |
Step 7 — Add to retired services log
Add a row to docs/RETIRED-SERVICES.md with:
- Service name
- Retirement date
- Reason for retirement
- Last active commit hash (the commit just before this retirement)
- PR/issue link (if applicable)
Step 8 — Remove per-service documentation
- Remove the symlink at
docs/services/<app>.md - Remove the entry from the
Services:section inmkdocs.yml
Step 9 — Update server mappings (if applicable)
If the app is listed in servers.yaml:
- Remove it from the server's app list
- Re-run
scripts/generate-sops-rules.shto update.sops.yaml - Re-encrypt secrets with
sops-rekeyif creation rules changed
Step 10 — Validate
-
Verify Traefik compose is still valid:
docker compose -f services/traefik/compose.yaml config --quiet -
Run the full lint suite:
mise exec -- lefthook run pre-commit -
Grep for the app name across the repo — only historical references in
CHANGELOG.mdanddocs/RETIRED-SERVICES.mdshould remain.
Step 11 — Post-merge manual steps (on the TrueNAS host)
These steps are destructive and require manual confirmation:
- Destroy the TrueNAS dataset:
vm-pool/apps/services/<app>(ensure backups are current first) - Remove the TrueNAS service account (user + group) if one was created for this app
- Remove stale Docker networks:
docker network pruneif the app's frontend network persists
Checklist
Use this as a final review before committing:
-
services/<app>/directory is deleted - Traefik compose and overrides are cleaned up
- Traefik middlewares/chains are removed (if any existed)
- DNS A-record is removed
- Gatus monitoring is removed (if any existed)
- README.md, docs/index.md, ARCHITECTURE.md, INFRASTRUCTURE.md are updated
- docs/RETIRED-SERVICES.md has the new entry
- Per-service docs symlink and mkdocs.yml entry are removed
- servers.yaml and SOPS rules are updated (if applicable)
-
docker compose config --quietpasses for Traefik - Grep for app name shows only historical references
When not to use it
- →When the app is still needed or active
- →When only stopping containers without full decommissioning
- →When the app is not a Docker Compose app from the TrueNAS Apps repository
Limitations
- →Specific to retiring Docker Compose apps from the TrueNAS Apps repository
- →Requires manual post-merge steps for destructive actions on the TrueNAS host
- →Assumes a specific repository structure and configuration files
How it compares
This skill provides a complete, step-by-step procedure for decommissioning a Docker Compose app, ensuring all integration points and documentation are cleaned up, which is more thorough than simply deleting the app's directory.
Compared to similar skills
retire-docker-app side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| retire-docker-app (this skill) | 0 | 3mo | Review | Advanced |
| docker-expert | 11 | 6mo | Review | Intermediate |
| deployment-engineer | 4 | 3mo | No flags | Advanced |
| devops | 2 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DevSecNinja
View all by DevSecNinja →You might also like
docker-expert
davila7
Docker containerization expert with deep knowledge of multi-stage builds, image optimization, container security, Docker Compose orchestration, and production deployment patterns. Use PROACTIVELY for Dockerfile optimization, container issues, image size problems, security hardening, networking, and orchestration challenges.
deployment-engineer
sickn33
Expert deployment engineer specializing in modern CI/CD pipelines, GitOps workflows, and advanced deployment automation. Masters GitHub Actions, ArgoCD/Flux, progressive delivery, container security, and platform engineering. Handles zero-downtime deployments, security scanning, and developer experience optimization. Use PROACTIVELY for CI/CD design, GitOps implementation, or deployment automation.
devops
mrgoonie
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
ecs
itsmostafa
AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.
add-install-docker-ci-e2e
RLinf
Adds install command in install script, Docker build stage in Dockerfile, and CI jobs for docker build, install script, and embodied e2e test when introducing a new model or environment in RLinf. Use when adding a new embodied model (e.g. dexbotic), new env (e.g. maniskill_libero), or new model+env combination that should be installable, dockerized, and tested in CI.
devcontainer-management
netalertx
Guide for identifying, managing, and running commands within the NetAlertX development container. Use this when asked to run commands, testing, setup scripts, or troubleshoot container issues.