URGENT: Fix 502 with Nginx Dockerfile

This commit is contained in:
Gemini CLI 2026-02-28 10:07:29 -06:00
parent f17f93df0c
commit b9c51ca243

View file

@ -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"]