From 35cb6808ebcd1228e3deac70fdbd6a10c0652fb2 Mon Sep 17 00:00:00 2001 From: sky Date: Fri, 12 Sep 2025 22:37:25 +0200 Subject: [PATCH] heatcheck --- Dockerfile | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index e40c22d..5b37227 100755 --- a/Dockerfile +++ b/Dockerfile @@ -7,21 +7,20 @@ ENV LANG=fr_FR.UTF-8 ENV LC_ALL=fr_FR.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends \ - apt-utils \ locales \ python3 \ python3-pip \ - python3-venv \ - wget \ - && wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb \ - && dpkg -i zabbix-release_latest_7.4+debian12_all.deb \ - && apt-get update \ - && apt-get install -y --no-install-recommends zabbix-agent2 \ - && sed -i 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen \ - && locale-gen \ - && rm -rf /var/lib/apt/lists/* \ - && rm zabbix-release_latest_7.4+debian12_all.deb + python3-venv + +RUN wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian13_all.deb; \ + dpkg -i zabbix-release*; \ + apt-get update; \ + apt-get install -y --no-install-recommends zabbix-agent2; \ + sed -i 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen; \ + locale-gen; \ + rm -rf /var/lib/apt/lists/* *.deb + COPY requirements.txt . COPY run-web.py . COPY ./database ./database @@ -36,4 +35,6 @@ RUN python3 -m venv /app/venv && \ /app/venv/bin/pip install --no-cache-dir -r requirements.txt && \ chmod +x /start.sh -CMD ["/start.sh"] \ No newline at end of file +HEALTHCHECK --interval=5m --timeout=1m --start-period=2m CMD /app/venv/bin/python /app/healthcheck.py --show-success --config-dir /app/config/ --hook-dir /app/config/healthcheck/ + +CMD ["/start.sh"]