refactor(env): update NEXT_PUBLIC_API_URL to use 'auto' for better flexibility

This commit is contained in:
Abhimanyu Saharan
2026-03-03 02:40:28 +05:30
parent 2031f8dcd8
commit 0fe61e3e08
11 changed files with 74 additions and 33 deletions

View File

@@ -13,7 +13,7 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . ./
# Allows configuring the API URL at build time.
ARG NEXT_PUBLIC_API_URL=http://localhost:8000
ARG NEXT_PUBLIC_API_URL=auto
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
ARG NEXT_PUBLIC_AUTH_MODE
ENV NEXT_PUBLIC_AUTH_MODE=${NEXT_PUBLIC_AUTH_MODE}
@@ -28,7 +28,7 @@ ARG NEXT_PUBLIC_AUTH_MODE
# If provided at runtime, Next will expose NEXT_PUBLIC_* to the browser as well
# (but note some values may be baked at build time).
ENV NEXT_PUBLIC_API_URL=http://localhost:8000
ENV NEXT_PUBLIC_API_URL=auto
ENV NEXT_PUBLIC_AUTH_MODE=${NEXT_PUBLIC_AUTH_MODE}
COPY --from=builder /app/.next ./.next