new-container

Scaffolds Ansible roles and docker-compose templates for new Docker services on daniel-pi.

2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/DanielH2018/server --skill new-container-danielh2018
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: new-container
Source: https://github.com/DanielH2018/server/tree/main/.claude/skills/new-container
Command: npx skills add https://github.com/DanielH2018/server --skill new-container-danielh2018

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new Docker service to the homelab requires creating an Ansible role, a Jinja2 docker-compose template, and a host_vars inventory entry that all follow strict existing conventions — doing this by hand risks missing tags, macros, or recreate triggers. ## Core Features & Use Cases - Role Scaffolding: Creates ansible/roles/containers/<name>/tasks/main.yml with the common role's setup_dirs.yml and docker_deploy.yml includes, plus correct config/deploy/cron block tags. - Compose Template Generation: Builds docker-compose.yml.j2 using the shared Traefik, Autokuma, networks, and resources macros, with healthchecks, PUID/PGID, and resource limits. - Inventory Registration: Adds the service to containers_list in host_vars/daniel-pi.yml so deploy tags derive automatically. - Use Case: You want to self-host a new LAN-only utility on the Raspberry Pi — the skill gathers the image, ports, volumes, and proxy requirements, then scaffolds all three files following repo conventions. ## Quick Start Ask the assistant to scaffold a new Docker service for daniel-pi, providing the service name, image, ports, and whether it needs Traefik or Authelia.

Frequently Asked Questions about new-container

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Docker container to an Ansible-managed homelab?▼

Create a role under ansible/roles/containers/<name>/ with tasks that include the common role's setup_dirs.yml and docker_deploy.yml, add a docker-compose.yml.j2 template using the shared macros, and register the service in the host's containers_list. Deploy tags derive automatically from the service name.

Can I use this skill to deploy services on daniel-server or daniel-box?▼

No. Since the k3s migration completed, daniel-server and daniel-box have no Docker installed, so a Compose role deploys nothing there. Cluster services must be scaffolded as roles under ansible/roles/k8s/ rendering Deployment, Service, and IngressRoute manifests instead.

Why is my container not recreated after editing a bind-mounted config file?▼

The docker_deploy default of recreate: auto only detects docker-compose.yml or image changes, not bind-mounted file contents. Register the template or copy task and pass its changed state via common_config_changed to the docker_deploy include to force recreation.

How do I run config-only Ansible deployments without restarting containers?▼

Every task carries a block tag: config for directories and files, deploy for container lifecycle, cron for scheduled jobs. Run with --tags <name> --skip-tags deploy for config-only runs; note that --skip-tags config is unsupported because config registers feed the recreate decision.

Should I hand-write networks and labels in the docker-compose template?▼

No. Use the shared macros in ansible/templates/: service_networks() and external_networks() for networking, labels() from traefik.yml.j2 for reverse-proxy routing, kuma labels for monitoring, and resources() for CPU and memory limits.