Skip to content

Add Dokploy (Docker) deployment; keep Vercel until cutover#30

Merged
loganlanou merged 1 commit into
mainfrom
feat/dokploy-deploy
May 27, 2026
Merged

Add Dokploy (Docker) deployment; keep Vercel until cutover#30
loganlanou merged 1 commit into
mainfrom
feat/dokploy-deploy

Conversation

@loganlanou
Copy link
Copy Markdown
Collaborator

Summary

Adds a working container deploy for the dynamic app (cmd/server) targeting a self-hosted Dokploy server, alongside the existing Vercel static export. Vercel is left fully intact until cutover.

  • Dockerfile — rewrote the stale one (it was golang:1.23, used go install @latest, and never ran sqlc generate — which is gitignored, so it would have failed to build). Now:
    • multi-stage on golang:1.26-alpine (matches go.mod)
    • generates templ + sqlc via the pinned go tool versions (no drift)
    • builds minified Tailwind, compiles a static CGO_ENABLED=0 binary (modernc.org/sqlite is pure Go → no sqlite C lib in runtime)
    • embedded goose migrations (not copied); /app/data is a VOLUME for the SQLite DB
    • final image ~28 MB
  • .dockerignore — also exclude bin/ and dist/.
  • DEPLOY.md — Dokploy steps (Dockerfile build, /app/data volume, env vars, /health check), a security warning that /admin is open unless Clerk is configured, and confirmation that the Vercel static build is untouched.

Test plan

  • docker build succeeds (~28 MB image)
  • Container boots: auto-migrates the persistent volume to v5, serves /health, /, /admin, /static/css/output.css200 (production JSON logs)
  • Dev auth bypass /auth/dev/login404 (compiled out of the production image)
  • Vercel path unaffected: go run ./cmd/build still exports the full static site (no gallery), no errors

Notes

  • ⚠️ Set CLERK_SECRET_KEY + CLERK_PUBLISHABLE_KEY (and ADMIN_EMAILS) on the Dokploy app before exposing a public domain — without Clerk, /admin is unauthenticated.
  • Vercel (vercel.json + make build-static) stays as-is until the Dokploy deploy is verified live, then cut the domain over.

🤖 Generated with Claude Code

Add a working container deploy for the dynamic app (cmd/server) targeting a
self-hosted Dokploy server, alongside the existing Vercel static export.

- Dockerfile: rewrite the stale one (was golang:1.23, go install @latest, and
  never ran sqlc generate — would fail). Now multi-stage on golang:1.26-alpine,
  generates templ + sqlc via the pinned `go tool` versions, builds minified
  Tailwind, and compiles a static CGO_ENABLED=0 binary (modernc sqlite is pure
  Go). Runtime is alpine + ca-certificates; ~28MB. Goose migrations are embedded
  so they aren't copied. /app/data is a VOLUME for the SQLite DB.
- .dockerignore: also exclude bin/ and dist/.
- DEPLOY.md: Dokploy setup (Dockerfile build, /app/data volume, env vars,
  /health check) plus a security warning that admin is open unless Clerk is
  configured, and notes that Vercel's static build is untouched until cutover.

Verified: `docker build` + run boots, auto-migrates the volume, serves
/health, /, /admin, CSS (200); dev auth bypass is 404 (compiled out); and
`go run ./cmd/build` (the Vercel path) still produces the static site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rowe-tech Building Building Preview, Comment May 27, 2026 1:45pm

@loganlanou loganlanou merged commit 1c93665 into main May 27, 2026
2 of 3 checks passed
@loganlanou loganlanou deleted the feat/dokploy-deploy branch May 27, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant