Update Dockerfile
This commit is contained in:
+9
-9
@@ -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;"]
|
||||
Reference in New Issue
Block a user