Skip to content

Commit 3634562

Browse files
committed
Update
1 parent d8d85cb commit 3634562

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ COPY . .
1616
# Build the app
1717
RUN npm run build
1818

19-
# Expose port 5757
20-
EXPOSE 5757
19+
# Stage 2: Serve the app with Nginx
20+
FROM nginx:alpine
2121

22-
# Start nginx
23-
CMD ["npm","run","preview"]
22+
# Copy the built files from the previous stage to the Nginx html directory
23+
COPY --from=build /app/dist /usr/share/nginx/html
24+
25+
# Expose port 80
26+
EXPOSE 80
27+
28+
# Start Nginx
29+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)