initial feature/react-migration commit
This commit is contained in:
28
dashboard-dash-backup/config.py
Normal file
28
dashboard-dash-backup/config.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# dashboard/config.py
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# .env aus Root‐Verzeichnis laden
|
||||
base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
load_dotenv(os.path.join(base_dir, ".env"))
|
||||
|
||||
# DB‐Einstellungen
|
||||
DB_HOST = os.getenv("DB_HOST")
|
||||
DB_PORT = int(os.getenv("DB_PORT", "3306"))
|
||||
DB_USER = os.getenv("DB_USER")
|
||||
DB_PASSWORD = os.getenv("DB_PASSWORD")
|
||||
DB_NAME = os.getenv("DB_NAME")
|
||||
DB_POOL_NAME = os.getenv("DB_POOL_NAME", "my_pool")
|
||||
DB_POOL_SIZE = int(os.getenv("DB_POOL_SIZE", "5"))
|
||||
|
||||
# MQTT‐Einstellungen
|
||||
MQTT_BROKER_HOST = os.getenv("MQTT_BROKER_HOST")
|
||||
MQTT_BROKER_PORT = int(os.getenv("MQTT_BROKER_PORT", "1883"))
|
||||
MQTT_USERNAME = os.getenv("MQTT_USERNAME")
|
||||
MQTT_PASSWORD = os.getenv("MQTT_PASSWORD")
|
||||
MQTT_KEEPALIVE = int(os.getenv("MQTT_KEEPALIVE", "60"))
|
||||
MQTT_CLIENT_ID = os.getenv("MQTT_CLIENT_ID")
|
||||
|
||||
# Sonstige Einstellungen
|
||||
SECRET_KEY = os.getenv("SECRET_KEY", "changeme")
|
||||
ENV = os.getenv("ENV", "development")
|
||||
Reference in New Issue
Block a user