Add generated-site Docker deployment scaffold and docs #202

Closed
opened 2026-06-24 13:37:08 -05:00 by erik · 2 comments
Owner

Goal

Make generated Slugkit sites easier to deploy by including a Docker build scaffold and deployment documentation in the template.

Requirements

  • Add a Dockerfile to the generated site/template that builds and runs the standalone Slugkit website.
  • Ensure the Dockerfile is appropriate for generated sites, not only the Slugkit toolkit repository.
  • Document deployment setup in template/site/README.md.
  • Include instructions for configuring GitHub Actions to build and publish the generated site image.
  • Include instructions for publishing the image to a container registry.
  • Include hosting instructions for running the published image with required environment variables and persistent storage considerations.

Acceptance criteria

  • slug init generated sites include a working Dockerfile for the website.
  • The Dockerfile builds the generated site and runs the production server.
  • Template README includes GitHub Actions setup guidance for deployment.
  • Template README explains how to publish the image to a registry.
  • Template README explains how to host/run the image, including environment variables and persistence for SQLite/media where applicable.
  • Tests verify generated sites include the Dockerfile and deployment docs.
## Goal Make generated Slugkit sites easier to deploy by including a Docker build scaffold and deployment documentation in the template. ## Requirements - Add a `Dockerfile` to the generated site/template that builds and runs the standalone Slugkit website. - Ensure the Dockerfile is appropriate for generated sites, not only the Slugkit toolkit repository. - Document deployment setup in `template/site/README.md`. - Include instructions for configuring GitHub Actions to build and publish the generated site image. - Include instructions for publishing the image to a container registry. - Include hosting instructions for running the published image with required environment variables and persistent storage considerations. ## Acceptance criteria - [ ] `slug init` generated sites include a working Dockerfile for the website. - [ ] The Dockerfile builds the generated site and runs the production server. - [ ] Template README includes GitHub Actions setup guidance for deployment. - [ ] Template README explains how to publish the image to a registry. - [ ] Template README explains how to host/run the image, including environment variables and persistence for SQLite/media where applicable. - [ ] Tests verify generated sites include the Dockerfile and deployment docs.
Author
Owner

Synced from todu comment by @todu on 2026-06-24T19:03:38.369Z

PR review completed for slugkit PR #204.

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.

_Synced from todu comment by @todu on 2026-06-24T19:03:38.369Z_ PR review completed for slugkit PR #204. 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.
erik 2026-06-24 14:10:21 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-24T19:05:04.976Z

Completed and merged in slugkit PR #204.

Acceptance criteria: 6/6 met.

Evidence:

  • slug init generated sites now include Dockerfile and .dockerignore.
  • 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.
  • Template README documents local Docker build/run, one-off migrations, GitHub Actions image publishing, registry publishing, hosting, runtime environment variables, SQLite persistence, and S3/media persistence guidance.
  • CLI slug init tests verify generated Docker files and deployment docs.
  • 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 passed.
  • PR #204 merged into main, local main fast-forwarded, and the local feature branch was deleted.
_Synced from todu comment by @todu on 2026-06-24T19:05:04.976Z_ Completed and merged in slugkit PR #204. Acceptance criteria: 6/6 met. Evidence: - `slug init` generated sites now include `Dockerfile` and `.dockerignore`. - 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`. - Template README documents local Docker build/run, one-off migrations, GitHub Actions image publishing, registry publishing, hosting, runtime environment variables, SQLite persistence, and S3/media persistence guidance. - CLI `slug init` tests verify generated Docker files and deployment docs. - 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 passed. - PR #204 merged into `main`, local `main` fast-forwarded, and the local feature branch was deleted.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#202
No description provided.