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
|
FROM node:20-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
@ -5,9 +6,8 @@ RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:20-alpine
|
# Estágio de Produção (Nginx)
|
||||||
WORKDIR /app
|
FROM nginx:stable-alpine
|
||||||
RUN npm install -g serve
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
COPY --from=build /app/dist ./dist
|
EXPOSE 80
|
||||||
EXPOSE 3000
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
CMD ["serve", "-s", "dist", "-l", "3000"]
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue