/datumpin:docker-compose-conventionsfrom datumpin
Dockerfiles and compose files - dev/prod split, multi-stage builds, volumes, restart policy, non-root users. Frontend, cron and local packages in siblings.
Ships in datumpin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Env files, ports, networks and the ownership entrypoint belong to config-led-deployment. Build-time credentials belong to secrets-handling. This skill owns Dockerfile and compose mechanics.
Branches that load a sibling file:
Which files, tags and env file each environment uses is in gitea-workflows, Environments. What the compose files add:
:dev and its container names end -dev, so a local image is never mistaken for the registry's :prep.docker-compose.yml. It pulls ${IMAGE_REGISTRY}/<app>-<service>:${IMAGE_TAG}, ends container names with -${CHANNEL}, and the host's env file sets all three. A server runs docker compose pull and up -d; only CI builds Dockerfile.Run one environment per host, because their ports collide; config-led-deployment shifts the ports where two must share one.
Where a repo has several instances, scripts/compose.py generates the compose files from the instance folders, and each instance starts with its own env file through --env-file (see config-led-deployment).
The builder stage installs and builds. The final stage copies only the built artifact into a minimal runtime image, so source, node_modules and build caches stay in the builder.
FROM node:20.20-slim AS builder
...
FROM nginxinc/nginx-unprivileged:1.31-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
The full frontend serve stage (proxy template, port, compose) is in frontend.md.
When bind-mounting source for hot reload, pin dependency directories as anonymous volumes so the host mount cannot shadow the container-built ones (native bindings differ by platform).
volumes:
- ./services/api:/app
- /app/venv # anonymous volume: protects the container's own venv
Compose reattaches a service's existing anonymous volume to its recreated container, so --build, --force-recreate and --no-cache all leave stale dependencies in place. After a dependency change, run docker compose rm -fsv <service> (removes the container and its anonymous volumes), then up -d --build.
A build output folder the container writes inside a bind-mounted source tree (./frontend/dist) is an anonymous volume (/app/dist) that the Dockerfile created owned by the app user. The host folder keeps its own permissions.
docker compose restart keeps the container's creation-time environment. After editing an env file, run docker compose up -d <service>, which recreates the container against the current file.
restart: unless-stopped goes on every service in both compose files, so containers return after an engine restart.
Every service container that mounts an instance folder runs the ownership docker-entrypoint.sh from config-led-deployment: it starts as root, adopts the owner of the mounted instance folder, and drops to that uid:gid before execing the app. The image also creates appuser as the fallback for a root-owned mount, and as the whole rule for a service that mounts no instance folder:
RUN useradd -m appuser && chown -R appuser:appuser /app
USER appuser
appuser.npm run dev create appuser too. A prod frontend runs as nginx-unprivileged's own user (frontend.md).Start Dockerfiles with # syntax=docker/dockerfile:1. Build-time credentials use secret mounts scoped to one RUN layer (see secrets-handling).
Every image carries its software bill of materials at /sbom.json, built in the image (cyclonedx-py for Python). Every repo gitignores sboms/.
./sboms:/sboms.gitea-workflows, Dependency versions.docker compose -f <file> config -q passes for every compose file you touched.grep -c "restart:" docker-compose*.yml equals the service count in each file.grep -L "^USER" Dockerfile* lists only images that drop privileges in an entrypoint or run as their base image's own non-root user (nginx-unprivileged).docker exec <container> printenv <VAR> shows the new value.docker exec <container> ...).What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
31 skills in this plugin
/alembic-migrationsAlembic migrations in a FastAPI/SQLAlchemy service - env.py, SQLite batch mode, container-only commands. Use when adding or reviewing a migration./alignAlign - find and fix drift between code, tickets and plans. Use when a repo joins the workflow, direction changes, a milestone closes, or to clean the backlog./api-documentationDocumenting HTTP APIs - endpoint docstrings, router READMEs, docs/reference/api. Use when adding or editing a FastAPI route./boardBoard - sync the Gitea tickets, show the kanban, suggest the next ticket. Use at session start or when asked for the board, backlog or what to do next./change-readyChange ready - the checklist a change passes before it is opened as a PR. Use when finishing work, before a closing commit, or asked if it is ready./change-reviewReview a diff on two axes, Standards and Spec, with parallel subagents. Use when reviewing a branch, a PR, work in progress or changes since a commit.npx claudepluginhub jago971/dp-cli --plugin datumpin