fix: Dockerfile에 NEXT_PUBLIC_API_URL ARG 추가, ENV 형식 수정

This commit is contained in:
AutonetSellCar Deploy
2025-12-31 11:06:48 +09:00
parent d48de13377
commit 9969554deb

View File

@@ -14,7 +14,10 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1
# Build-time environment variable for API URL
ARG NEXT_PUBLIC_API_URL=https://autonetsellcar.com
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build
@@ -22,8 +25,8 @@ RUN npm run build
FROM base AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
@@ -40,7 +43,7 @@ USER nextjs
EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
CMD ["node", "server.js"]