From fad830f6d5ec7811001d52f5a525956e061ff976 Mon Sep 17 00:00:00 2001 From: ppfeiffer Date: Wed, 18 Feb 2026 18:23:27 +0100 Subject: [PATCH] feat: v0.7.0 - Docker-Verbesserungen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile: EXPOSE 8080 → 8081 + HEALTHCHECK auf /api/stats - docker-compose.yml: healthcheck + json-file logging (10MB/3 Dateien) - conf/config.yaml: Version 0.7.0, Host/Port aktualisiert Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 9 +++++++++ Dockerfile | 7 ++++++- conf/config.yaml | 6 +++--- config.yaml | 2 +- docker-compose.yml | 11 +++++++++++ 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d18d276..2057709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [0.7.0] - 2026-02-18 + +### Changed +- **Dockerfile**: `EXPOSE` von 8080 auf 8081 korrigiert (entspricht Web-Port in config.yaml). +- **Dockerfile**: `HEALTHCHECK` hinzugefügt – prüft `/api/stats` alle 30s, + Timeout 5s, Start-Wartezeit 20s, max. 3 Versuche. +- **docker-compose.yml**: `healthcheck` und `logging` (json-file, 10 MB / 3 Dateien) ergänzt. +- **conf/config.yaml**: Version auf 0.7.0 und Verbindungsdaten aktualisiert. + ## [0.6.15] - 2026-02-18 ### Added diff --git a/Dockerfile b/Dockerfile index 087e827..7935523 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,18 @@ FROM python:3.12-slim WORKDIR /app +# Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +# Copy application COPY meshbot/ meshbot/ COPY static/ static/ COPY main.py . -EXPOSE 8080 +EXPOSE 8081 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ + CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8081/api/stats')" || exit 1 CMD ["python", "main.py"] diff --git a/conf/config.yaml b/conf/config.yaml index 7746cc8..dc008c8 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -1,16 +1,16 @@ -version: "0.6.1" +version: "0.7.0" bot: name: "MeshDD-Bot" command_prefix: "?" meshtastic: - host: "192.168.11.11" + host: "192.168.11.4" port: 4403 web: host: "0.0.0.0" - port: 8080 + port: 8081 database: path: "data/meshdd.db" diff --git a/config.yaml b/config.yaml index 1abda86..11ac5af 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -version: "0.6.15" +version: "0.7.0" bot: name: "MeshDD-Bot" diff --git a/docker-compose.yml b/docker-compose.yml index 972dd17..5f765cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,17 @@ services: - ./conf/scheduler.yaml:/app/scheduler.yaml - meshdd-data:/app/data restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8081/api/stats')"] + interval: 30s + timeout: 5s + start_period: 20s + retries: 3 + logging: + driver: "json-file" + options: + max-size: "10m" + max-files: "3" volumes: meshdd-data: