Files
Elecciones-2025/Elecciones-Web/frontend/Dockerfile
2025-09-09 09:54:50 -03:00

20 lines
486 B
Docker

#Dockerfile
# --- Etapa 1: Build ---
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# --- Etapa 2: Producción ---
FROM nginx:1.25-alpine
COPY --from=build /app/dist /usr/share/nginx/html
# Copia la configuración de Nginx al contenedor del frontend
COPY frontend.nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
# El CMD es opcional ya que la imagen base lo tiene, pero no hace daño
CMD ["nginx", "-g", "daemon off;"]