1
0
Fork 0

fix(docker): pass NEXT_PUBLIC_ARENA_URL into the production build

Coolify marks this variable build-time and passes it as a build arg, but
the builder stage never declared it, so `next build` saw an empty value
and inlined nothing. The client transport reads
`process.env.NEXT_PUBLIC_ARENA_URL` with dot access, so an empty build
value silently left every install on the HTTP fallback path.

Declare the arg and forward it through ENV before the build, the same way
the GIT_* build args are handled.
This commit is contained in:
Jason Fraley 2026-10-19 14:05:43 -04:00
parent 53387c957f
commit 2b5f274886

View file

@ -130,6 +130,11 @@ ENV SOURCE_COMMIT=$SOURCE_COMMIT \
GIT_COMMIT_HASH=$GIT_COMMIT_HASH \
GIT_COMMIT_DATE=$GIT_COMMIT_DATE \
GIT_COMMIT_SUBJECT=$GIT_COMMIT_SUBJECT
# Public arena origin for the client bundle. Next.js inlines NEXT_PUBLIC_*
# at build time, and Coolify passes build-time variables as build args; the
# bare ARG preserves the injected value and ENV forwards it to the build.
ARG NEXT_PUBLIC_ARENA_URL
ENV NEXT_PUBLIC_ARENA_URL=$NEXT_PUBLIC_ARENA_URL
RUN bun run build
# ───────────────────────── runner-arena ────────────────────────────