mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-15 04:30:37 +01:00
Refactorer Docker et mettre à jour README
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -12,15 +12,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
procps
|
||||
procps \
|
||||
apache2-utils
|
||||
|
||||
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; \
|
||||
RUN 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
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
COPY run-web.py .
|
||||
@@ -29,14 +26,14 @@ COPY ./discordbot ./discordbot
|
||||
COPY ./protondb ./protondb
|
||||
COPY ./webapp ./webapp
|
||||
COPY ./twitchbot ./twitchbot
|
||||
COPY zabbix_agent2.conf /etc/zabbix/zabbix_agent2.conf
|
||||
COPY start.sh /start.sh
|
||||
|
||||
RUN python3 -m venv /app/venv && \
|
||||
/app/venv/bin/pip install --no-cache-dir -r requirements.txt && \
|
||||
chmod +x /start.sh
|
||||
chmod +x /start.sh && \
|
||||
mkdir -p /app/logs
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD pgrep python > /dev/null || exit 1
|
||||
CMD pgrep python > /dev/null && ! (find /app/logs -name "app.log.*" -exec tail -n 20 {} \; 2>/dev/null | grep -E "ERROR|CRITICAL|Exception") || exit 1
|
||||
|
||||
CMD ["/start.sh"]
|
||||
|
||||
Reference in New Issue
Block a user