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 FROM node:22-alpine AS build
WORKDIR /app WORKDIR /app
@@ -14,14 +14,14 @@ COPY . .
# Build the Angular app for production # Build the Angular app for production
RUN npm run build RUN npm run build
# ----- Stage 2: Serve SSR App ----- # ----- Stage 2: Serve Angular App with Nginx -----
FROM node:22-alpine AS final 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. # Expose standard HTTP port 80
COPY --from=build /app/preview ./dist EXPOSE 80
EXPOSE 4000 # Start Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]
CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"]