Add Dokploy (Docker) deployment; keep Vercel until cutover#30
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.golang:1.23, usedgo install @latest, and never ransqlc generate— which is gitignored, so it would have failed to build). Now:golang:1.26-alpine(matchesgo.mod)go toolversions (no drift)CGO_ENABLED=0binary (modernc.org/sqlite is pure Go → no sqlite C lib in runtime)/app/datais aVOLUMEfor the SQLite DBbin/anddist/./app/datavolume, env vars,/healthcheck), a security warning that/adminis open unless Clerk is configured, and confirmation that the Vercel static build is untouched.Test plan
docker buildsucceeds (~28 MB image)/health,/,/admin,/static/css/output.css→ 200 (production JSON logs)/auth/dev/login→ 404 (compiled out of the production image)go run ./cmd/buildstill exports the full static site (no gallery), no errorsNotes
CLERK_SECRET_KEY+CLERK_PUBLISHABLE_KEY(andADMIN_EMAILS) on the Dokploy app before exposing a public domain — without Clerk,/adminis unauthenticated.vercel.json+make build-static) stays as-is until the Dokploy deploy is verified live, then cut the domain over.🤖 Generated with Claude Code