From 2080f396dc5628fcbd55f63466515cbbe42e0fc6 Mon Sep 17 00:00:00 2001 From: juan-server Date: Wed, 5 Aug 2026 07:21:46 -0500 Subject: [PATCH] docker compose --- Dockerfile | 27 +++------------------------ docker-compose.yml | 7 +++++++ frontend/css/styles.css | 33 +++++++++++++++++++++++++++++++++ frontend/index.html | 15 +++++++++++++++ 4 files changed, 58 insertions(+), 24 deletions(-) create mode 100644 docker-compose.yml create mode 100644 frontend/css/styles.css create mode 100644 frontend/index.html diff --git a/Dockerfile b/Dockerfile index 461e586..46eb39b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,7 @@ -FROM node:20-alpine - -WORKDIR /app - -# Instalar Nginx para servir el frontend -RUN apk add --no-cache nginx - -# Copiar e instalar dependencias del backend -COPY backend/package*.json ./backend/ -RUN cd backend && npm install - -# Copiar el backend -COPY backend ./backend +FROM nginx:alpine # Copiar el frontend a la carpeta de Nginx COPY frontend /usr/share/nginx/html -# Copiar configuración de Nginx -COPY nginx.conf /etc/nginx/http.d/default.conf - -# Exponer puertos -EXPOSE 80 3000 - -# Script para iniciar backend y Nginx al mismo tiempo -COPY start.sh /start.sh -RUN chmod +x /start.sh - -CMD ["/start.sh"] +# Exponer el puerto 80 del contenedor +EXPOSE 80 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..eaf95c8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + nominas: + build: . + container_name: nominas-app + ports: + - "9005:80" + restart: unless-stopped diff --git a/frontend/css/styles.css b/frontend/css/styles.css new file mode 100644 index 0000000..f1b7ded --- /dev/null +++ b/frontend/css/styles.css @@ -0,0 +1,33 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: Arial, sans-serif; + background-color: #f5f5f5; + color: #333; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.container { + background: white; + padding: 2rem; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + text-align: center; + max-width: 400px; +} + +h1 { + margin-bottom: 1rem; + color: #2c3e50; +} + +p { + color: #666; +} diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..b42667e --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,15 @@ + + + + + + Sistema de Nóminas + + + +
+

Sistema de Nóminas

+

Bienvenido al sistema de gestión de nóminas.

+
+ +