Docker draus gemacht

This commit is contained in:
rxf
2026-01-25 19:48:00 +01:00
parent 5f516f5dd4
commit cff7f80463
6 changed files with 122 additions and 7 deletions

View File

@@ -6,18 +6,23 @@ Wetterstation - MQTT Datenempfang und Web-Visualisierung
import sqlite3
import json
import threading
import os
from datetime import datetime, timedelta
from flask import Flask, render_template, jsonify
import paho.mqtt.client as mqtt
from dotenv import load_dotenv
# Konfiguration
MQTT_HOST = "rexfue.de"
MQTT_PORT = 1883
MQTT_TOPIC = "vantage/live" # Bitte anpassen!
MQTT_USER = "stzuhr" # Bitte anpassen!
MQTT_PASSWORD = "74chQCYb" # Bitte anpassen!
# Lade Umgebungsvariablen aus .env Datei
load_dotenv()
DB_FILE = "wetterdaten.db"
# Konfiguration aus Umgebungsvariablen
MQTT_HOST = os.getenv("MQTT_HOST", "rexfue.de")
MQTT_PORT = int(os.getenv("MQTT_PORT", 1883))
MQTT_TOPIC = os.getenv("MQTT_TOPIC", "vantage/live")
MQTT_USER = os.getenv("MQTT_USER", "")
MQTT_PASSWORD = os.getenv("MQTT_PASSWORD", "")
DB_FILE = os.getenv("DB_FILE", "wetterdaten.db")
app = Flask(__name__)