refactor: replace cron-based notification scheduling with continuous worker execution in Dockerfile

This commit is contained in:
2026-07-29 15:36:02 -03:00
parent 2a33f636a0
commit 446968c03f
+2 -8
View File
@@ -29,14 +29,8 @@ COPY --from=builder /app/dist ./dist
# Copiar archivos de entorno a la raíz /app # Copiar archivos de entorno a la raíz /app
COPY --from=builder /app/.env* ./ COPY --from=builder /app/.env* ./
# Instalar bash y cron
RUN apk add --no-cache bash curl
# Crear carpeta de logs # Crear carpeta de logs
RUN mkdir -p /app/logs RUN mkdir -p /app/logs
# Agregar tarea de cron: todos los días a las (9-3)UTF = 6AM GMT-3 # Ejecutar el worker continuo de jobs de notificaciones
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 CMD ["node", "dist/index.js"]
# Mantener cron en primer plano
CMD ["crond", "-f", "-L", "/app/logs/cron.log"]