- Updated .gitignore to include additional IDE and OS files, as well as log and web build directories. - Expanded config.sample.yaml to include cache configuration options for memory and Redis. - Modified wallamonitor.py to load cache configuration and initialize ArticleCache. - Refactored QueueManager to utilize ArticleCache for tracking notified articles. - Improved logging setup to dynamically determine log file path based on environment.
30 lines
506 B
Docker
30 lines
506 B
Docker
FROM node:18-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copiar archivos de dependencias
|
|
COPY package.json package-lock.json* ./
|
|
|
|
# Instalar dependencias
|
|
RUN npm ci
|
|
|
|
# Copiar código fuente
|
|
COPY . .
|
|
|
|
# Construir aplicación
|
|
RUN npm run build
|
|
|
|
# Stage de producción - servir con nginx
|
|
FROM nginx:alpine
|
|
|
|
# Copiar archivos construidos
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
# Copiar configuración de nginx
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|
|
|