Add Docker image for self-hosted deployment

- next.config: output "standalone" for a self-contained server bundle
- Dockerfile: multi-stage build that runs as the node user, read-only-rootfs
  friendly (Next cache symlinked to /tmp), with a healthcheck
- README: document deploying to playground.jun-liu.net

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-09 04:00:30 +00:00
co-authored by Claude Opus 5.5
parent 7c962d9d7b
commit c0b624554e
4 changed files with 53 additions and 2 deletions
+12 -1
View File
@@ -34,6 +34,16 @@ npm run dev # http://localhost:3000
| `npm run build` | Production build. Every page is statically prerendered. |
| `npm run format` | Runs Prettier, which also sorts Tailwind classes |
## Deploying
Live at **https://playground.jun-liu.net**.
Merging to `main` deploys automatically: the server builds the `Dockerfile` and
swaps the running container. If a build fails, the running version stays up.
The image uses Next's `standalone` output and runs as the unprivileged `node`
user on a read-only filesystem.
## Structure
```
@@ -63,4 +73,5 @@ src/
- [ ] Toast stack with swipe-to-dismiss
- [ ] Playwright visual regression and axe checks in CI
- [ ] Case-study write-ups for each component: the problem, the options, and the decision
- [ ] Deploy (Vercel) and link from a portfolio
- [x] Deploy
- [ ] Link from a portfolio