Fix deploying process.
This commit is contained in:
+8
-1
@@ -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"]
|
||||
Reference in New Issue
Block a user