Add Dockerfile and nginx config for frontend

This commit is contained in:
Motoko
2026-03-30 15:33:32 +00:00
parent c9cb07dbfc
commit 329f7509f5
2 changed files with 59 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copiar archivos de configuración
COPY package.json package-lock.json ./
# Instalar dependencias
RUN npm ci
# Copiar código fuente
COPY . .
# Build de la aplicación
RUN npm run build
# Production stage
FROM nginx:alpine
# Copiar archivos del build
COPY --from=builder /app/dist /usr/share/nginx/html
# Copiar configuración de nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]