From 446968c03fa996606a783ff6fc4442954f96a0c8 Mon Sep 17 00:00:00 2001 From: Horacio Daniel Ros Date: Wed, 29 Jul 2026 15:36:02 -0300 Subject: [PATCH] refactor: replace cron-based notification scheduling with continuous worker execution in Dockerfile --- notification-sender/Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/notification-sender/Dockerfile b/notification-sender/Dockerfile index caee25c..4cbf4f8 100644 --- a/notification-sender/Dockerfile +++ b/notification-sender/Dockerfile @@ -29,14 +29,8 @@ COPY --from=builder /app/dist ./dist # Copiar archivos de entorno a la raíz /app COPY --from=builder /app/.env* ./ -# Instalar bash y cron -RUN apk add --no-cache bash curl - # Crear carpeta de logs RUN mkdir -p /app/logs -# Agregar tarea de cron: todos los días a las (9-3)UTF = 6AM GMT-3 -RUN echo "0 9 * * * cd /app && NODE_ENV=production NODE_NO_WARNINGS=1 DOTENV_DISABLE_TELEMETRY=1 node dist/index.js >> /app/logs/cron.log 2>&1" > /etc/crontabs/root - -# Mantener cron en primer plano -CMD ["crond", "-f", "-L", "/app/logs/cron.log"] +# Ejecutar el worker continuo de jobs de notificaciones +CMD ["node", "dist/index.js"]