Add generated-site Docker deployment scaffold #204

Merged
erik merged 1 commit from feat/task-f8aa1782-docker-deployment-scaffold into main 2026-06-24 14:04:15 -05:00
Owner

Summary

Add Docker deployment scaffold and deployment documentation to generated Slugkit sites.

Task

Task: #task-f8aa1782

Changes

  • Added generated-site Dockerfile and .dockerignore to the template.
  • Moved tsx to template runtime dependencies because npm start uses it in production.
  • Documented local image builds, one-off migrations, image publishing through GitHub Actions, registry usage, and hosting with persistent SQLite/media considerations.
  • Updated slug init tests to verify generated Docker files and deployment docs.

Testing

  • Unit tests added/updated
  • Manual testing performed

Verification:

  • npm exec --workspace @evcraddock/slug-cli -- vitest run --config ../vitest.config.ts src/__tests__/commands.test.ts
  • Generated-site smoke at /tmp/slugkit-docker-check: npm install, npm run build, npm test, docker build -t slugkit-docker-check:local .
  • Container smoke: one-off npm run db:migrate, start container, GET /health returned {"status":"ok"}
  • ./scripts/pre-pr.sh

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated
  • No unrelated changes included
## Summary Add Docker deployment scaffold and deployment documentation to generated Slugkit sites. ## Task Task: #task-f8aa1782 ## Changes - Added generated-site `Dockerfile` and `.dockerignore` to the template. - Moved `tsx` to template runtime dependencies because `npm start` uses it in production. - Documented local image builds, one-off migrations, image publishing through GitHub Actions, registry usage, and hosting with persistent SQLite/media considerations. - Updated `slug init` tests to verify generated Docker files and deployment docs. ## Testing - [x] Unit tests added/updated - [x] Manual testing performed Verification: - `npm exec --workspace @evcraddock/slug-cli -- vitest run --config ../vitest.config.ts src/__tests__/commands.test.ts` - Generated-site smoke at `/tmp/slugkit-docker-check`: `npm install`, `npm run build`, `npm test`, `docker build -t slugkit-docker-check:local .` - Container smoke: one-off `npm run db:migrate`, start container, `GET /health` returned `{"status":"ok"}` - `./scripts/pre-pr.sh` ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated - [x] No unrelated changes included
feat: add generated-site Docker deployment scaffold
All checks were successful
CI / build-lint-test (pull_request) Successful in 52s
6ef3444791
Task: #task-f8aa1782
Author
Owner

PR review completed for task task-f8aa1782.

Result: approved

Acceptance criteria: 6/6 met, 0 missing.

Verification:

  • Reviewed task scope, PR body, and diff for generated-site Docker deployment scaffold and documentation.
  • Confirmed slug init generated sites include Dockerfile and .dockerignore.
  • Confirmed Dockerfile uses a standalone generated-site layout, builds with npm run build, installs production dependencies, exposes port 3000, sets DATABASE_PATH=/app/data/slugkit.sqlite, declares /app/data as a volume, and runs npm start.
  • Confirmed tsx was moved to runtime dependencies because npm start uses it in the production image.
  • Confirmed template README documents Docker build/run, one-off migrations, GitHub Actions image publishing, registry publishing, hosting, runtime environment variables, SQLite persistence, and media/S3 persistence guidance.
  • Confirmed CLI slug init tests verify generated Docker files and deployment docs.
  • Local targeted test passed: npm exec --workspace @evcraddock/slug-cli -- vitest run --config ../vitest.config.ts src/__tests__/commands.test.ts.
  • Manual generated-site smoke passed at /tmp/slugkit-docker-check: npm install, npm run build, npm test, and docker build -t slugkit-docker-check:local ..
  • Container smoke passed: one-off npm run db:migrate, started container, and GET /health returned {"status":"ok"}.
  • Local full gate passed: ./scripts/pre-pr.sh.
  • Forgejo Actions #286 succeeded for commit 6ef3444 (build-lint-test, pull_request).

Blocking issues: none.
Warnings: none.

Merge gate: waiting for explicit human approval.

PR Review Worker Result

  • pr: open
  • review: approved
  • pr_comment: posted
  • task_comment: posted
  • blocking_issues: 0
  • warnings: 0
  • criteria_total: 6
  • criteria_met: 6
  • criteria_missing: 0
PR review completed for task `task-f8aa1782`. Result: approved Acceptance criteria: 6/6 met, 0 missing. Verification: - Reviewed task scope, PR body, and diff for generated-site Docker deployment scaffold and documentation. - Confirmed `slug init` generated sites include `Dockerfile` and `.dockerignore`. - Confirmed Dockerfile uses a standalone generated-site layout, builds with `npm run build`, installs production dependencies, exposes port `3000`, sets `DATABASE_PATH=/app/data/slugkit.sqlite`, declares `/app/data` as a volume, and runs `npm start`. - Confirmed `tsx` was moved to runtime dependencies because `npm start` uses it in the production image. - Confirmed template README documents Docker build/run, one-off migrations, GitHub Actions image publishing, registry publishing, hosting, runtime environment variables, SQLite persistence, and media/S3 persistence guidance. - Confirmed CLI `slug init` tests verify generated Docker files and deployment docs. - Local targeted test passed: `npm exec --workspace @evcraddock/slug-cli -- vitest run --config ../vitest.config.ts src/__tests__/commands.test.ts`. - Manual generated-site smoke passed at `/tmp/slugkit-docker-check`: `npm install`, `npm run build`, `npm test`, and `docker build -t slugkit-docker-check:local .`. - Container smoke passed: one-off `npm run db:migrate`, started container, and `GET /health` returned `{"status":"ok"}`. - Local full gate passed: `./scripts/pre-pr.sh`. - Forgejo Actions #286 succeeded for commit `6ef3444` (`build-lint-test`, pull_request). Blocking issues: none. Warnings: none. Merge gate: waiting for explicit human approval. PR Review Worker Result - pr: open - review: approved - pr_comment: posted - task_comment: posted - blocking_issues: 0 - warnings: 0 - criteria_total: 6 - criteria_met: 6 - criteria_missing: 0
erik merged commit 2631f0a63d into main 2026-06-24 14:04:15 -05:00
erik deleted branch feat/task-f8aa1782-docker-deployment-scaffold 2026-06-24 14:04:15 -05:00
Sign in to join this conversation.
No description provided.