Fix deploying process.

This commit is contained in:
2025-05-08 00:10:58 +08:00
parent 4682fe3eb4
commit 357097bb2b
6 changed files with 28 additions and 13 deletions
+8 -1
View File
@@ -11,6 +11,10 @@ RUN npm ci --prefer-offline --no-audit
# Copy the rest of the application code
COPY . .
# Pass build-time environment variables
ARG BACKEND_URL
ENV BACKEND_URL=${BACKEND_URL}
# Build the Next.js app
RUN npm run build
@@ -26,6 +30,9 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
# Runtime environment variables
ENV BACKEND_URL=${BACKEND_URL}
EXPOSE 3000
CMD ["npm", "start"]
CMD ["npm", "start"]