fix: NEXT_PUBLIC_* URLs als Docker Build-Args weitergereicht
This commit is contained in:
@@ -14,6 +14,12 @@ RUN corepack enable && \
|
|||||||
pnpm config set store-dir /opt/michess/.pnpm-store && \
|
pnpm config set store-dir /opt/michess/.pnpm-store && \
|
||||||
pnpm install --no-frozen-lockfile
|
pnpm install --no-frozen-lockfile
|
||||||
|
|
||||||
|
# Build-time env vars for Next.js (baked into the frontend bundle)
|
||||||
|
ARG NEXT_PUBLIC_API_URL=http://localhost:3001
|
||||||
|
ARG NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||||
|
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||||
|
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
|
||||||
|
|
||||||
# Build server and client
|
# Build server and client
|
||||||
RUN pnpm build:server && pnpm build:client
|
RUN pnpm build:server && pnpm build:client
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
services:
|
services:
|
||||||
michess:
|
michess:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3001}
|
||||||
|
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
|
||||||
image: michess:latest
|
image: michess:latest
|
||||||
container_name: michess
|
container_name: michess
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
Reference in New Issue
Block a user