Skip to content

feat: improve Docker, Caddy, and CI/CD for production deployment - #10

Open
Roy-Wanyoike wants to merge 1 commit into
mainfrom
feat/deploy-cdn-improvements
Open

feat: improve Docker, Caddy, and CI/CD for production deployment#10
Roy-Wanyoike wants to merge 1 commit into
mainfrom
feat/deploy-cdn-improvements

Conversation

@Roy-Wanyoike

Copy link
Copy Markdown
Owner

Summary

Improves the deployment infrastructure for production-ready Docker and CDN serving.

Docker (Multi-stage Standalone)

  • 4-stage build: deps → builder → runner (production) → dev
  • Production image uses Next.js standalone output (~80% smaller)
  • Build args for all environment variables (Supabase, auth, etc.)
  • Health check via /api/health
  • Improved .dockerignore (excludes internal dirs, test artifacts)

Caddy (CDN-friendly Caching)

  • Static assets (/_next/static/*): 1 year immutable
  • Worklet files (/worklets/*.js): 1 day + 7 day SWR
  • Effect CSS (/ferrum-effects.css): 1 day + 7 day SWR
  • API routes (/api/*): no-store
  • Environment variables: FERRUM_PORT, FERRUM_HOST

CI/CD

  • Deploy workflow builds and pushes Docker image to GHCR
  • Fixed release tarball name (ferrumcss → ferrumengine)
  • Deployment summary with pull & run instructions

Files Modified

  • Dockerfile — Complete rewrite (multi-stage standalone)
  • .dockerignore — Comprehensive exclusions
  • Caddyfile — Per-path caching + env vars
  • .github/workflows/deploy.yml — GHCR Docker build + push
  • .github/workflows/release.yml — Fix tarball name

Docker:
- Multi-stage build with standalone output (smaller production image)
- Build args for all environment variables
- Health check endpoint
- Dev stage for development containers
- Improved .dockerignore

Caddy:
- Per-path cache control (static: 1yr immutable, API: no-store, CSS: SWR)
- Environment variable support (FERRUM_PORT, FERRUM_HOST)
- Proper reverse proxy headers

CI/CD:
- Deploy workflow now builds and pushes Docker image to GHCR
- Fixed release tarball name (ferrumcss → ferrumengine)
- Deployment summary with pull & run instructions
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ferrum-engine Building Building Preview Aug 31, 2026 6:23pm

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