Files
xiaoxia-saas/infra/docker/web.Dockerfile
T
Xiaoxia AI 4f1186c75e
Deploy / Deploy Staging (push) Failing after 6s
Deploy / Deploy Production (push) Has been skipped
Tests / test (push) Failing after 2m13s
Tests / lint (push) Failing after 1m57s
fix: configure API URL for production frontend
2026-06-17 00:25:27 +08:00

22 lines
697 B
Docker

FROM node:20 AS builder
WORKDIR /app
ARG NEXT_PUBLIC_API_URL=http://47.98.113.167:8089
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
COPY apps/web/package.json ./apps/web/package.json
COPY apps/web/ ./apps/web/
WORKDIR /app/apps/web
RUN npm config set registry https://registry.npmmirror.com \
&& npm install \
&& npm run build
FROM node:20 AS runner
WORKDIR /app/apps/web
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=builder /app/apps/web/package.json ./package.json
COPY --from=builder /app/apps/web/.next ./.next
COPY --from=builder /app/apps/web/public ./public
COPY --from=builder /app/apps/web/node_modules ./node_modules
EXPOSE 3000
CMD ["npm", "run", "start"]