Migrate hosting off Vercel → Docker on Oracle Cloud (Dokploy + GHCR)#44
Open
oliverhuangcode wants to merge 1 commit into
Open
Migrate hosting off Vercel → Docker on Oracle Cloud (Dokploy + GHCR)#44oliverhuangcode wants to merge 1 commit into
oliverhuangcode wants to merge 1 commit into
Conversation
Migrate hosting off Vercel to a Docker container on the shared Oracle Cloud VM, deployed via Dokploy from a GHCR image built in GitHub Actions. Mirrors the monmap migration, adapted to this repo's stack. - next.config.ts: output "standalone" for a self-contained server bundle - Dockerfile: multi-stage, non-root, single-package Next 16 shape. Public Sanity vars are build-args (SSG queries Sanity at build); RESEND_API_KEY and SANITY_WEBHOOK_SECRET stay runtime-only in Dokploy - pin npm via packageManager + corepack so CI matches the lockfile - package-lock.json: sync (adds missing encoding/iconv-lite transitive deps) so `npm ci` succeeds in the image build; no version changes - .github/workflows/deploy.yml: ubuntu-24.04-arm builds linux/arm64, pushes ghcr.io/monashcoding/monashcoding:latest + sha, gha cache, then POSTs the Dokploy webhook (self-skips until the secret exists) - vercel.json: disable Vercel's GitHub deploy checks - docs/deploy.md: Dokploy runbook, build-vs-runtime env, apex cutover Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Moves the club's main site off Vercel to a Docker container on the shared Oracle Cloud VM, deployed via Dokploy from a GHCR image built in GitHub Actions. Mirrors the monmap migration, adapted to this repo's stack.
Stack detected
package-lock.json), pinned tonpm@11.11.0next buildis SSG (revalidate = falseeverywhere +generateStaticParams) → queries the Sanity API at build timeWhat's here
next.config.ts—output: "standalone"Dockerfile— multi-stage, non-root runtime user, single-package Next standalone shape (no monorepo tracing/transpile). PublicNEXT_PUBLIC_SANITY_*are build-args (inlined + read by Studio config);RESEND_API_KEY/SANITY_WEBHOOK_SECRETare runtime-only in DokploypackageManager+COREPACK_ENABLE_DOWNLOAD_PROMPT=0so CI resolves the lockfile as generatedpackage-lock.jsonsync — the committed lockfile was already out of sync (missingencoding/iconv-lite), which would failnpm ciin the image build. Fix adds only those transitive deps + normalization; no version changes.github/workflows/deploy.yml—ubuntu-24.04-armbuildslinux/arm64, pushesghcr.io/monashcoding/monashcoding:latest+ sha tag,type=ghacache, then POSTsDOKPLOY_DEPLOY_WEBHOOK(self-skips until the secret exists)vercel.json— disables Vercel's GitHub deploy checksdocs/deploy.md— Dokploy runbook + apex-domain cutover checklistVerified locally
npm cisucceeds against the synced lockfiletsc --noEmittypecheck passesnext buildnot run locally — it's SSG and needs the real Sanity project id + network to prerender (no local.env). First CI run is the fast-feedback gate; the runbook notes this.Manual follow-ups (can't be done from code — see docs/deploy.md)
NEXT_PUBLIC_SANITY_PROJECT_ID(+ optionally dataset/API version; both have fallbacks)DOKPLOY_DEPLOY_WEBHOOKmonashcoding.comcanonical +www301→apex. Cloudflare A record for apex, grey-cloud first for the LE cert, then orange-cloudcurl -I -H "Host: monashcoding.com" http://localhoston the box (don't swap a working site for a 502)mainbranch-protection rule🤖 Generated with Claude Code