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
|
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"]
|
|
||||||
Reference in New Issue
Block a user