worker sigue fallando
Some checks failed
build-and-push / build (push) Failing after 28s
build-and-push / deploy (push) Has been skipped

This commit is contained in:
2025-05-14 18:54:47 -06:00
parent 3595d4c76b
commit a59521aafd

View File

@@ -1,19 +1,24 @@
# base liviano con Node y cron
FROM node:24-slim
# instala cronie
RUN apk add --no-cache cronie
# instala cron y utilidades necesarias
RUN apt-get update && \
apt-get install -y cron && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# dependencias
COPY package*.json ./
RUN npm ci --omit=dev # solo deps prod
RUN npm ci --omit=dev # solo deps de producción
# código fuente
COPY . .
# scripts de sistema: se lanzan por cronie
COPY cron/ /etc/periodic/
RUN chmod +x /etc/periodic/*/*
# arranca cron (en background) y luego Node
CMD sh -c "crond -f & node cron-worker.js"
# scripts de sistema: se lanzan por cron
COPY cron/ /etc/cron.d/
RUN chmod +x /etc/cron.d/* && \
crontab /etc/cron.d/*
# arranca cron y luego Node
CMD sh -c "cron && node cron-worker.js"