Simplificar Docker a imagen única y actualizar workflow CI/CD
Some checks failed
build-and-deploy / build (push) Failing after 47s
build-and-deploy / deploy (push) Has been skipped

This commit is contained in:
2025-08-15 12:18:42 -06:00
parent 3385636129
commit 84aef0774d
4 changed files with 86 additions and 45 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM node:18-alpine
WORKDIR /app
# Copiar archivos de configuración
COPY package*.json ./
COPY server/package*.json ./server/
COPY client/package*.json ./client/
# Instalar dependencias
RUN npm install
RUN cd server && npm install
RUN cd client && npm install
# Copiar código fuente
COPY . .
# Compilar servidor y cliente
RUN cd server && npm run build
RUN cd client && npm run build
# Instalar serve para servir archivos estáticos
RUN npm install -g serve
# Script de inicio
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
# Exponer puertos
EXPOSE 3000 2567
# Ejecutar ambos servicios
CMD ["/app/start.sh"]