new file: .gitignore new file: Dockerfile new file: README.md new file: app.py new file: auth.py new file: config.py new file: db.py new file: db_helpers.py new file: docker-compose.yml new file: requirements.txt new file: routes/__init__.py new file: routes/admin_routes.py new file: routes/auth_routes.py new file: routes/journal_routes.py new file: static/css/style.css new file: static/js/main.js new file: templates/admin/dashboard.html new file: templates/admin/users.html new file: templates/base.html new file: templates/day.html new file: templates/future.html new file: templates/index.html new file: templates/login.html new file: templates/week.html
29 lines
865 B
Python
29 lines
865 B
Python
"""Zentrale Konfiguration aus Umgebungsvariablen."""
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
|
|
class Config:
|
|
"""Liest alle Einstellungen aus Umgebungsvariablen (Coolify)."""
|
|
|
|
SECRET_KEY = os.getenv("SECRET_KEY", "dev-secret-change-me")
|
|
PEPPER = os.getenv("PEPPER", "dev-pepper-change-me")
|
|
|
|
DB_HOST = os.getenv("DB_HOST", "localhost")
|
|
DB_PORT = int(os.getenv("DB_PORT", "3306"))
|
|
DB_USER = os.getenv("DB_USER", "journal")
|
|
DB_PASSWORD = os.getenv("DB_PASSWORD", "journalpass")
|
|
DB_DATABASE = os.getenv("DB_DATABASE", "journal")
|
|
|
|
# Bootstrap-Admin
|
|
ADMIN_USERNAME = os.getenv("ADMIN_USERNAME", "admin")
|
|
ADMIN_PASSWORD = os.getenv("ADMIN_PASSWORD", "admin")
|
|
|
|
# PBKDF2 Iterationen für das Passwort-Hashing
|
|
HASH_ITERATIONS = 100_000
|
|
|
|
SESSION_COOKIE_HTTPONLY = True
|
|
SESSION_COOKIE_SAMESITE = "Lax"
|