feat: add Docker and Docker Compose support for self-hosting
From the PR description
Summary
- Adds
backend/Dockerfileandfrontend/Dockerfilefor both services - Adds
docker-compose.ymlat the repo root to wire them together - Adds
.env.exampledocumenting the three build-time vars needed by Compose - Sets
output: "standalone"innext.config.tsfor a smaller frontend runtime image
Why
Makes self-hosting straightforward - the full stack can be built and started with a single command:
docker compose up --build
No platform-specific tooling required. The deployment still uses the existing Supabase and Cloudflare R2 infrastructure - this is purely about packaging and running the app, not replacing any services.
Changes
backend/Dockerfile: multi-stage build; installs LibreOffice in the runner stage (required bylibreoffice-convert), compiles TypeScript and runsnode dist/index.jsfrontend/Dockerfile: multi-stage build;NEXT_PUBLIC_*vars passed as build args (baked in at build time by Next.js), copies only the standalone output for a minimal imagedocker-compose.yml: exposes backend on 3001, frontend on 3000; frontend depends on backend; both load env from their respective.envfiles.env.example: documents the root-level build args for Composefrontend/next.config.ts: addsoutput: "standalone"- required for the optimized Docker image, no effect on the existing Cloudflare deployment path
Testing
Built and ran locally with both containers healthy:
- Backend:
http://localhost:3001/healthreturns{"ok":true} - Frontend:
http://localhost:3000serves the app
Our analysis
Add Docker packaging and Compose for one-command self-hosting — read the full analysis →
Think the analysis missed something the PR description covers?
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-149.md from
inside the repo you want the changes in.