8th_fix docker

This commit is contained in:
beabigegg
2025-09-03 18:08:40 +08:00
parent 3b1bbcd2bc
commit a339b78788
13 changed files with 926 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json package-lock.json* ./
RUN npm ci --only=production
RUN npm ci
# Rebuild the source code only when needed
FROM base AS builder
@@ -15,6 +15,10 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Set build-time environment variables
ARG NEXT_PUBLIC_API_URL=http://localhost:12011
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
# Build the application
RUN npm run build