-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 877 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Dockerfile para Panoptes - Optimizado para Cloud Run
FROM node:20-slim
# Metadata
LABEL maintainer="MedalCode"
LABEL description="Panoptes - Sistema de aplicación automática a empleos con IA"
# Crear directorio de trabajo
WORKDIR /app
# Copiar package files
COPY backend/package*.json ./
# Instalar dependencias de producción
RUN npm install --production
# Copiar todo el código del backend
COPY backend/ ./
# Copiar dashboard web al lugar correcto relativo al backend
COPY web-dashboard/ /app/web-dashboard/
# Variables de entorno
ENV NODE_ENV=production
ENV PORT=8080
# Exponer puerto
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:8080/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Comando para iniciar
CMD ["node", "server.js"]