dockerize-and-deploy

Installation
SKILL.md

Dockerize 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

  1. Dockerfile — multi-stage: builder installs/compiles, runtime copies artifacts only, non-root user, pinned base image (e.g. node:20.11-alpine), .dockerignore excludes node_modules/.env/.git.
  2. docker-compose — dev stack: source mounts for hot reload, debug ports, named volumes.
  3. Production compose (docker-compose.prod.yml) — no source mounts, restart: unless-stopped, healthchecks, explicit volumes, mem_limit/cpus limits. See REFERENCE.md.
  4. Pre-flight — copy scripts/preflight.sh into the project; validates env vars, Docker, port conflicts, DB reachability, dry-run build. Run: bash scripts/preflight.sh.
  5. Deployscripts/deploy.sh: run preflight.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

Installs
50
First Seen
Apr 1, 2026
dockerize-and-deploy — rockclaver/systemcraft