Skip to content

Commit ed25acb

Browse files
committed
Update Dockerfile
1 parent 064a2df commit ed25acb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ RUN npm run build
3131
FROM node:22-alpine AS production
3232
ENV NODE_ENV=production
3333
WORKDIR /app
34-
# Copy built assets from build stage
34+
# Copy built assets and package files from build stage
3535
COPY --from=build /app/dist ./dist
3636
COPY --from=build /app/package.json ./package.json
37+
COPY --from=build /app/package-lock.json ./package-lock.json
3738
# Install only production dependencies
3839
RUN npm install --omit=dev --ignore-scripts
3940
# Expose production port
4041
EXPOSE 4321
41-
# Start production server
42-
CMD ["node", "./dist/server/entry.mjs"]
42+
# Start production server using Astro preview
43+
CMD ["npm", "run", "preview", "--", "--host"]

0 commit comments

Comments
 (0)