Add Docker support — multi-stage Dockerfile and compose config#30
Open
officialasit wants to merge 1 commit into
Open
Add Docker support — multi-stage Dockerfile and compose config#30officialasit wants to merge 1 commit into
officialasit wants to merge 1 commit into
Conversation
Self-hosters can now run nodepad end-to-end with `docker compose up` without touching Node locally. - Multi-stage Dockerfile (deps → builder → runner) on node:22-alpine, non-root `node` user, ~313 MB image - `output: "standalone"` in next.config.mjs for a minimal server bundle (ignored by Vercel, so existing deployment path is unaffected) - docker-compose.yml with `init: true` for correct signal handling and a node-based healthcheck (avoids installing curl in the image) - HOST_PORT env var to override the host-side port mapping; container always binds to 3000 internally - .dockerignore mirroring .gitignore plus build artifacts - README: new "Run with Docker" subsection under Setup, noting the single-replica constraint from proxy.ts's in-memory rate limiter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dev-020
added a commit
to Dev-020/nodepad_Dev
that referenced
this pull request
May 12, 2026
chore(backlog): close #4, mskayyali#27, add mskayyali#30
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.
Summary
Lets self-hosters run nodepad with a single
docker compose up— no local Node toolchain needed. The container is stateless (notes and AI keys live in the browser'slocalStorage), so there's nothing to mount, back up, or configure on the server side.deps→builder→runner) onnode:22-alpine, non-rootnodeuser, ~313 MB imageoutput: "standalone"innext.config.mjsfor a minimal self-contained server bundle. This is ignored by Vercel's build adapter, so the existing Vercel deployment path is unaffecteddocker-compose.ymlwithinit: true(tini as PID 1 for correct signal handling) and anode -e 'fetch(...)'healthcheck so the image doesn't need curl/wgetHOST_PORTenv var to override the host-side port mapping; the container always binds to3000internally..env.exampledocuments it.dockerignoremirroring.gitignoreplus build artifacts and local-only filesNotes for reviewers
webbeyond 1 replica.proxy.tsuses an in-memoryMapas a rate limiter for/api/fetch-url, which assumes a single process. This is called out in both the compose file header and the README..env.examplecontrol the container runtime (HOST_PORT). AI provider keys continue to live inlocalStorageand go directly to the provider.output: "standalone"does not auto-copypublic/or.next/static; the runner stage copies them explicitly.Test plan
docker compose buildsucceeds onnode:22-alpinedocker compose up -d— container starts and healthcheck transitions tohealthyGET /→ 200, HTML servedGET /icon.svg→ 200 (confirmspublic/was copied in standalone mode)cat /proc/1/comminside container →docker-init(tini is PID 1, signal forwarding works)docker compose down— clean shutdown🤖 Generated with Claude Code