URGENT: Fix 502 with Nginx Dockerfile
This commit is contained in:
parent
f17f93df0c
commit
b9c51ca243
1 changed files with 6 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# Estágio de Build
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
|
@ -5,9 +6,8 @@ RUN npm install
|
|||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
RUN npm install -g serve
|
||||
COPY --from=build /app/dist ./dist
|
||||
EXPOSE 3000
|
||||
CMD ["serve", "-s", "dist", "-l", "3000"]
|
||||
# Estágio de Produção (Nginx)
|
||||
FROM nginx:stable-alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue