From 5e688aa1fad1ee3797c4a60e37f30c830220a193 Mon Sep 17 00:00:00 2001 From: Guillermo Date: Sun, 15 Feb 2026 10:38:22 +0000 Subject: [PATCH] vuelta a node par aservir frontend --- frontend/Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 73cb43e..6858d52 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -20,19 +20,22 @@ ENV VITE_API_BASE_URL=${VITE_API_BASE_URL} # Construimos el bundle RUN npm run build -# 2) Fase de servidor estático -# FROM node:20-alpine -FROM nginx:alpine +# 2) Fase de servidor estático. Tenemos que revisar +FROM node:20-alpine +#FROM nginx:alpine -# WORKDIR /app -RUN rm -rf /usr/share/nginx/html/* +WORKDIR /app +#RUN rm -rf /usr/share/nginx/html/* # Copiamos el build -COPY --from=build /app/dist /usr/share/nginx/html +#COPY --from=build /app/dist /usr/share/nginx/html +COPY --from=build /app/dist ./dist # Server estático muy simple -# RUN npm install -g serve +RUN npm install -g serve -EXPOSE 80 +#EXPOSE 80 +EXPOSE 4173 -CMD ["nginx", "-g", "daemon off;"] +#CMD ["nginx", "-g", "daemon off;"] +CMD ["serve", "-s", "dist", "-l", "4173"]