From 2433b48c35dba9d63f8f7f03c6cc62e9f9034be9 Mon Sep 17 00:00:00 2001 From: garbelo Date: Sat, 14 Feb 2026 22:50:49 +0000 Subject: [PATCH] image frontend reduction --- frontend/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 8853524..73cb43e 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -21,16 +21,18 @@ ENV VITE_API_BASE_URL=${VITE_API_BASE_URL} RUN npm run build # 2) Fase de servidor estático -FROM node:20-alpine +# FROM node:20-alpine +FROM nginx:alpine -WORKDIR /app +# WORKDIR /app +RUN rm -rf /usr/share/nginx/html/* # Copiamos el build -COPY --from=build /app/dist ./dist +COPY --from=build /app/dist /usr/share/nginx/html # Server estático muy simple -RUN npm install -g serve +# RUN npm install -g serve -EXPOSE 4173 +EXPOSE 80 -CMD ["serve", "-s", "dist", "-l", "4173"] +CMD ["nginx", "-g", "daemon off;"]