Update Dockerfile

This commit is contained in:
2026-07-24 14:00:29 +00:00
parent 2d068bda03
commit b3da7f8e1c
+9 -9
View File
@@ -1,4 +1,4 @@
# ----- Stage 1: Build Angular SSR App -----
# ----- Stage 1: Build Angular App -----
FROM node:22-alpine AS build
WORKDIR /app
@@ -14,14 +14,14 @@ COPY . .
# Build the Angular app for production
RUN npm run build
# ----- Stage 2: Serve SSR App -----
FROM node:22-alpine AS final
# ----- Stage 2: Serve Angular App with Nginx -----
FROM nginx:alpine
WORKDIR /app
# Copy the built assets from the build stage into Nginx's default HTML folder
COPY --from=build /app/preview /usr/share/nginx/html
# Copy the built assets from the build stage.
COPY --from=build /app/preview ./dist
# Expose standard HTTP port 80
EXPOSE 80
EXPOSE 4000
CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"]
# Start Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]