docker compose

This commit is contained in:
2026-08-05 07:21:46 -05:00
parent 4fe2f7394e
commit 2080f396dc
4 changed files with 58 additions and 24 deletions
+3 -24
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
services:
nominas:
build: .
container_name: nominas-app
ports:
- "9005:80"
restart: unless-stopped
+33
View File
@@ -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;
}
+15
View File
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sistema de Nóminas</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div class="container">
<h1>Sistema de Nóminas</h1>
<p>Bienvenido al sistema de gestión de nóminas.</p>
</div>
</body>
</html>