add-docker-app
Skill869 starsChanged 33 days agoApache-2.0View on GitHub
Use when deploying or changing an application on the docker hosts (gladius, icarus) — docker-compose stacks under docker/, doco-cd deployments, "deploy X to the NAS", secrets or reverse-proxy wiring for a compose app
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-appSkill
- renovate-reviewSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Secrets: add VAR_NAME: op://<vault>/<item>/<field> under external_secrets in docker/<host>/.doco-cd.yaml, reference as ${VAR_NAME} in the …
- Very specific: line 31
Only publish ports: directly for non-HTTP protocols (see towonel: 22, 51820/udp).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add an App to a Docker Host
Apps live in docker/<host>/NN-<app>/docker-compose.yaml, deployed GitOps-style by doco-cd (config: docker/<host>/.doco-cd.yaml): it polls this repo's main hourly, auto-discovers stacks one directory deep, and delete: true means removing (or renaming) a directory deletes the running stack. Mirror an existing app rather than inventing structure:
| Host | Proxy | Network | Reference apps |
gladius (TrueNAS) | traefik (02-traefik, docker provider with exposedByDefault: false plus an inline file provider, wildcard *.bjw-s.dev) | apps, or network_mode: host | 05-zot (labels, config, bind-mount storage), 03-exporters (host network) |
icarus | caddy-l4 (03-caddy-l4, Caddyfile) | external edge (no published ports for HTTP) | 04-gatus (config file, secrets), 02-towonel (published non-HTTP ports) |
Steps
- Directory: next free
NN-prefix on that host (ls docker/<host>/). The number is just ordering; keep it stable — renaming triggers delete+recreate. - Compose file — conventions from existing apps:
- Top-level
name: <app>andcontainer_name: <app>,restart: unless-stopped. - Registry-qualified image with a pinned version tag. Never write a tag from memory — look up the upstream project's current release first. Plain tags are fine; Renovate manages digests/updates. Keep a
# renovate: datasource=docker depName=...hint comment only if copying from an app that has one (e.g.01-crowdsec,02-towonel). - Set
user:where the image supports it (see towonel). - Config files:
config/subdirectory, wired via aconfigs:block (04-gatus,05-zot) or a read-only bind volume. - Persistent data: on gladius, named volume with
driver_optsbind to/mnt/tank/apps/<app>/<vol>(see zot); on icarus, host path (towonel uses/opt/<app>) or a named volume.
- Top-level
- Secrets: add
VAR_NAME: op://<vault>/<item>/<field>underexternal_secretsindocker/<host>/.doco-cd.yaml, reference as${VAR_NAME}in the compose file. Use the item's real field names (ask the user; never guess) — doco-cd injects these as env vars at deploy time. - Expose it (only if it serves HTTP):
- icarus: join the
edgenetwork (networks: default: {name: edge, external: true}), publish no HTTP ports, then registericarus-<app>.bjw-s.devin two places:VPS_LOCAL_HOSTSin03-caddy-l4/docker-compose.yamlAND areverse_proxy <container>:<port>site block in03-caddy-l4/config/Caddyfile. - gladius: join the
appsnetwork and add labels like05-zot:traefik.enable, aHost()router rule, the service port, anddexd.enabled: 'true'so dexd creates the DNS record pointing at traefik. To expose a service that runs on the host rather than in a container (such as the TrueNAS S3 service behinds3.bjw-s.dev), add a file-provider service to02-traefikand put the router labels on the traefik container itself. - Only publish
ports:directly for non-HTTP protocols (see towonel: 22, 51820/udp).
- icarus: join the
- Verify:
docker compose -f docker/<host>/NN-<app>/docker-compose.yaml config --quiet(unset${VAR}warnings are expected). Show the user the files before committing. Commit style:feat(<app>): Deploy to NAS.
Common mistakes
- Inventing an image tag — check the upstream release; a hallucinated tag deploys nothing or the wrong thing.
- Secret in compose but not in
.doco-cd.yaml— the${VAR}silently resolves empty. - Publishing HTTP ports on icarus — everything HTTP goes through caddy-l4 over
edge; published ports bypass TLS and auth. - Registering the hostname in only one of Caddyfile /
VPS_LOCAL_HOSTS— both are required. - Renaming/renumbering an existing app directory casually —
delete: truetears the old stack down, losing anonymous volumes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

