Skip to content

Containerize webapp + deploy to Oracle/Dokploy via GHCR (development)#283

Merged
oliverhuangcode merged 1 commit into
developmentfrom
oliver/dokploy-deploy-dev
Jul 7, 2026
Merged

Containerize webapp + deploy to Oracle/Dokploy via GHCR (development)#283
oliverhuangcode merged 1 commit into
developmentfrom
oliver/dokploy-deploy-dev

Conversation

@oliverhuangcode

Copy link
Copy Markdown
Contributor

Adds the Docker/Dokploy/GHCR deploy pipeline to development, which is now the branch Dokploy deploys from.

Supersedes the target of #281 (which merged the same pipeline into production). This PR carries the identical setup with the workflow trigger switched to push → development, applied on top of dev's current frontend.

Changes

  • frontend/Dockerfile — multi-stage node:22-slim, non-root nextjs user, runs the Next standalone server (node server.js).
  • frontend/next.config.tsoutput: "standalone" + outputFileTracingRoot pinned to the app dir (so the entrypoint lands flat at .next/standalone/server.js), keeping serverExternalPackages.
  • frontend/.dockerignore — lean, deterministic build context.
  • .github/workflows/deploy.yml — build linux/arm64 on ubuntu-24.04-arm, push ghcr.io/monashcoding/mploy:latest + sha tag with type=gha cache, then POST the Dokploy webhook. Triggers on push to development. Redeploy step self-skips until DOKPLOY_DEPLOY_WEBHOOK exists.
  • docs/deploy.md — Dokploy runbook (Docker provider, runtime env, port 3000, jobs.monashcoding.com, Cloudflare grey-cloud-first).

Key facts (same as #281)

  • npm, not pnpm; frontend/ is a standalone app (not a workspace) → build context ./frontend, no build-args.
  • No NEXT_PUBLIC_* vars; next build does not touch MongoDB (/jobs = ƒ Dynamic) → all secrets are runtime env in Dokploy. MongoDB is external (Atlas).

Verified on dev's codebase

  • npm ci + npm run build pass (TypeScript check included); build with no MONGODB_URI succeeds → no DB at build time.
  • .next/standalone/server.js lands flat, matching the Dockerfile CMD.

Note on production

production still has the pipeline from #281 with a production trigger. Since Dokploy now deploys off development, you likely want to either revert/neutralize the workflow on production or let the branches reconcile — happy to open that cleanup PR if you want.

🤖 Generated with Claude Code

Migrate the mploy webapp to a Docker container on the Oracle Cloud VM,
deployed by Dokploy from an image built in GitHub Actions and pushed to GHCR.
Mirrors the monmap setup, adapted to this repo (Next.js 16 + npm, single-package
frontend/, not a pnpm workspace).

Dokploy deploys off `development`, so the workflow triggers on push to
development.

- frontend/Dockerfile: multi-stage (deps -> build -> runner), node:22-slim,
  non-root nextjs user, runs the Next.js standalone server. No build-args --
  the app has no NEXT_PUBLIC_* vars and `next build` doesn't touch MongoDB,
  so all secrets are runtime env in Dokploy.
- frontend/next.config.ts: output "standalone" + outputFileTracingRoot pinned
  to the app dir so the entrypoint lands at .next/standalone/server.js.
- frontend/.dockerignore: keep the build context lean/deterministic.
- .github/workflows/deploy.yml: build linux/arm64 on ubuntu-24.04-arm, push
  ghcr.io/monashcoding/mploy:latest + sha tag with gha cache, then POST the
  Dokploy webhook (self-skips until DOKPLOY_DEPLOY_WEBHOOK is set).
- docs/deploy.md: Dokploy runbook (Docker provider, runtime env, port 3000,
  jobs.monashcoding.com, Cloudflare grey-cloud-first for the cert).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oliverhuangcode oliverhuangcode merged commit 453ab35 into development Jul 7, 2026
1 check passed
@oliverhuangcode oliverhuangcode deleted the oliver/dokploy-deploy-dev branch July 7, 2026 16:59
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