diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..01c1aa9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +venv/ +.git/ +__pycache__/ +*.db* +.env +docs/ +conf/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1df0b61..e045675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1] - 2026-02-17 +### Added +- Dockerfile fuer Container-Betrieb (python:3.12-slim) +- docker-compose.yml mit Host-Netzwerk und Named Volume fuer SQLite +- conf/ Verzeichnis mit Beispiel-Konfigurationsdateien fuer Docker +- .dockerignore fuer saubere Docker-Builds + ## [0.6.0] - 2026-02-17 ### Summary - Node-Detail-Modal mit Minikarte im Dashboard diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..087e827 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.12-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY meshbot/ meshbot/ +COPY static/ static/ +COPY main.py . + +EXPOSE 8080 + +CMD ["python", "main.py"] diff --git a/conf/config.yaml b/conf/config.yaml new file mode 100644 index 0000000..7746cc8 --- /dev/null +++ b/conf/config.yaml @@ -0,0 +1,19 @@ +version: "0.6.1" + +bot: + name: "MeshDD-Bot" + command_prefix: "?" + +meshtastic: + host: "192.168.11.11" + port: 4403 + +web: + host: "0.0.0.0" + port: 8080 + +database: + path: "data/meshdd.db" + +auth: + session_max_age: 86400 diff --git a/conf/env.example b/conf/env.example new file mode 100644 index 0000000..1f5a2ff --- /dev/null +++ b/conf/env.example @@ -0,0 +1,7 @@ +AUTH_SECRET_KEY=change-this-secret-key-32bytes!! +SMTP_HOST= +SMTP_PORT=465 +SMTP_USER= +SMTP_PASSWORD= +SMTP_FROM=MeshDD-Bot +SMTP_APP_URL=http://localhost:8080 diff --git a/conf/scheduler.yaml b/conf/scheduler.yaml new file mode 100644 index 0000000..472b6eb --- /dev/null +++ b/conf/scheduler.yaml @@ -0,0 +1,15 @@ +jobs: +- name: Wetterbericht + enabled: true + cron: 0 6,12,18 * * * + command: /weather + channel: 0 + description: Taeglicher Wetterbericht + type: command +- name: Mesh-Status + enabled: true + cron: 30 18 * * * + command: /mesh + channel: 0 + description: Mesh-Netzwerk Uebersicht + type: command diff --git a/config.yaml b/config.yaml index 4fcbbd1..6795827 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -version: "0.6.0" +version: "0.6.1" bot: name: "MeshDD-Bot" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..972dd17 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + meshdd-bot: + build: . + network_mode: host + volumes: + - ./conf/config.yaml:/app/config.yaml:ro + - ./conf/env:/app/.env:ro + - ./conf/scheduler.yaml:/app/scheduler.yaml + - meshdd-data:/app/data + restart: unless-stopped + +volumes: + meshdd-data: