Initial commit: Sistema de Gestión Hospitalaria

This commit is contained in:
2026-04-12 20:52:43 -03:00
commit 714a43fd38
93 changed files with 24674 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# Stage 1: Build frontend
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Backend + Nginx
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist dist
COPY server/package*.json server/
RUN cd server && npm ci
COPY server/server.js server/
COPY server/db.js server/
# Install nginx
RUN apk add --no-cache nginx && mkdir -p /usr/share/nginx/html
# Copy nginx config
COPY nginx.conf /etc/nginx/http.d/default.conf
# Create nginx directories
RUN mkdir -p /run/nginx
# Copy built frontend to nginx html directory
RUN cp -r dist/* /usr/share/nginx/html/
EXPOSE 80 4000
# Start both nginx and the backend
CMD nginx && node server/server.js