date heure pour le fichiers log et max retry corrigé

This commit is contained in:
sky
2025-09-14 05:59:39 +02:00
parent b99c80def4
commit 5954ea9401
2 changed files with 3 additions and 2 deletions

View File

@@ -35,6 +35,6 @@ RUN python3 -m venv /app/venv && \
mkdir -p /app/logs
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD pgrep python > /dev/null && ! (tail -n 1000 /app/logs/*.log 2>/dev/null | grep -iE "(ERROR|CRITICAL|Exception|sqlite3\.OperationalError)") || exit 1
CMD pgrep python > /dev/null && ! (tail -n 1000 $(ls -t /app/logs/*.log 2>/dev/null | head -1) 2>/dev/null | grep -iE "(ERROR|CRITICAL|Exception|sqlite3\.OperationalError)") || (echo "Healthcheck échoué, arrêt du conteneur" && kill 1)
CMD ["/start.sh"]