RE

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.zip

Installs 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.
205 chars✓ has a “when” trigger
Advanced

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

You give it
The name of the Docker Compose app to retire and the reason for retirement
You get back
A fully retired Docker Compose app with all associated configurations and documentation removed

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 in dccd.sh handle 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

  1. Traefik compose (services/traefik/compose.yaml) — remove the app's frontend network from the traefik service's networks: list and the corresponding external network definition at the bottom of the file.
  2. Traefik compose overrides — if the app appears in any services/traefik/compose.<server>.yaml override, remove it there too.
  3. Traefik middlewares (services/traefik/config/rules/middlewares.yml) — remove any app-specific middleware definitions (e.g. custom secure-headers).
  4. 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):

FileWhat to remove
README.mdApps table row, dataset list entry
docs/index.mdKeep in sync with README.md
docs/ARCHITECTURE.mdInit container table entries, shared env references, app-specific sections
docs/INFRASTRUCTURE.mdUID/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

  1. Remove the symlink at docs/services/<app>.md
  2. Remove the entry from the Services: section in mkdocs.yml

Step 9 — Update server mappings (if applicable)

If the app is listed in servers.yaml:

  1. Remove it from the server's app list
  2. Re-run scripts/generate-sops-rules.sh to update .sops.yaml
  3. Re-encrypt secrets with sops-rekey if creation rules changed

Step 10 — Validate

  1. Verify Traefik compose is still valid:

    docker compose -f services/traefik/compose.yaml config --quiet
    
  2. Run the full lint suite:

    mise exec -- lefthook run pre-commit
    
  3. Grep for the app name across the repo — only historical references in CHANGELOG.md and docs/RETIRED-SERVICES.md should 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 prune if 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 --quiet passes 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.

SkillInstallsUpdatedSafetyDifficulty
retire-docker-app (this skill)03moReviewAdvanced
docker-expert116moReviewIntermediate
deployment-engineer43moNo flagsAdvanced
devops26moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

1135

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.

418

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.

216

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.

215

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.

16

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.

13

Search skills

Search the agent skills registry