Repository navigation
build: optional npm and Go module mirrors for source builds - #1071
Open
chenhonggang0623-sketch wants to merge 2 commits into
Open
chenhonggang0623-sketch wants to merge 2 commits into
chenhonggang0623-sketch wants to merge 2 commits into
Conversation
Source builds run `npm ci` and `npm install -g` inside Docker. On networks where the build container cannot reach registry.npmjs.org the build fails with no supported override: MIRROR only redirects GHCR image pulls. Pass NPM_REGISTRY as an optional build arg from compose.dev.yaml, so `NPM_REGISTRY=https://registry.npmmirror.com ./start.sh dev` (or the same value in .env) reaches both npm steps. Empty keeps npm's default. Co-Authored-By: Claude Code <noreply@anthropic.com>
Source builds run `npm ci` and `go mod download` inside Docker. On networks where the build container cannot reach registry.npmjs.org or proxy.golang.org, the build fails with no supported override: MIRROR only redirects GHCR image pulls. - NPM_REGISTRY is passed to the chatbot and runtime npm installs. - GOPROXY is passed to the Go build stage. Both default to empty, which keeps each tool's own default. Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
Motivation
A source build (
./start.sh dev) runsnpm ci,npm install -gandgo mod downloadinside Docker. On networks where the build container cannot reachregistry.npmjs.orgorproxy.golang.orgthe build fails with no supported override —MIRRORonly redirects GHCR image pulls.This was hit while validating a local dev stack against a mirror-only network; both steps failed with TLS/network errors and the only workaround was editing the Dockerfile locally.
What changes
NPM_REGISTRYbuild arg, passed to the chatbotnpm ciand the runtimenpm install -gsteps.GOPROXYbuild arg for the Go build stage (setsGOPROXYin that stage).compose.dev.yamlfrom the environment or.env, documented indocs/deployment.mdand thestart.shheader.Usage
./start.sh devwith both mirrors was built and started successfully locally; the seeded SOP ran script → human gate → approval → completion.🤖 Generated with Claude Code