About dockerize-and-deploy
A skill that guides repository containerization and deployment setup in staged phases. It covers Docker files, pre-flight checks, deployment scripts, and verification, with safeguards for secrets and production configuration.
Key features
- 01Audit runtime and existing setup
- 02Build multi-stage Dockerfiles
- 03Configure development and production Compose
- 04Add pre-flight and deployment scripts
- 05Verify build and service health
- 06Apply container and secret safeguards
Use cases
- 01Containerize an existing repository
- 02Set up a local development stack
- 03Prepare a production Compose deployment
- 04Check a deployment before rollout
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ rockclaver/ systemcraft --skill dockerize-and-deployAfter installing, type/dockerize-and-deployin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
REFERENCE.mdscripts/deploy.shpreflight.shDetails
From the project READMEDockerize and Deploy
Containerize a repo and produce a deployment setup, one phase at a time.
Workflow
1. Audit
Identify runtime, services, datastores, build step, existing Docker files, and env vars. Propose phases before writing.
2. Phases
- Dockerfile — multi-stage: builder installs/compiles, runtime copies artifacts only, non-root user, pinned base image (e.g.
node:20.11-alpine),.dockerignoreexcludesnode_modules/.env/.git. - docker-compose — dev stack: source mounts for hot reload, debug ports, named volumes.
- Production compose (
docker-compose.prod.yml) — no source mounts,restart: unless-stopped, healthchecks, explicit volumes,mem_limit/cpuslimits. See REFERENCE.md. - Pre-flight — copy
scripts/preflight.shinto the project; validates env vars, Docker, port conflicts, DB reachability, dry-run build. Run:bash scripts/preflight.sh. - Deploy —
scripts/deploy.sh: runpreflight.sh(abort on fail) → pull/build image → run migrations → rolling restart → health-check → print status.
Merge or skip phases for simple repos.
3. Verify after each phase
docker build -t app:test . # Dockerfile compiles
docker compose config # compose files are valid YAML
docker compose up -d && docker compose ps # services start healthy
bash scripts/preflight.sh # pre-flight passes
Guardrails
- Never embed secrets in Docker/compose files.
- Always run containers as a non-root user.
- No
latestimage tags in production — pin versions. - DB volumes: named volumes only, never host bind mounts.
- No
.env.example? Create one first.
References
- REFERENCE.md — volume/healthcheck patterns, resource limits, multi-stage examples by runtime, rolling deploy strategies.
Comments
Markdown supported