Files
Vorrania/backend/app/config.py
Scarriffle ea67e6c1b0 Umbenennung Pantry -> Project-Good; README mit echter Clone-URL
- Anzeigename, Paketname, Token-Key, DB-/Volume-Namen auf project_good
- README Clone-Abschnitt mit git.scarriffle.com/Scarriffle/project-good

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 09:24:54 +02:00

35 lines
913 B
Python

from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
# Database
database_url: str = "postgresql+psycopg2://project_good:project_good@localhost:5432/project_good"
# Auth / JWT
jwt_secret: str = "change-me-in-production"
jwt_algorithm: str = "HS256"
jwt_expire_minutes: int = 60 * 24 * 7 # 7 days
# First admin, created on startup if no users exist
admin_username: str = "admin"
admin_password: str = "changeme"
# Open Food Facts
off_base_url: str = "https://world.openfoodfacts.org"
off_timeout_seconds: float = 8.0
# Behaviour
expiry_warning_days_default: int = 7
# CORS (comma separated); "*" allows all
cors_origins: str = "*"
@lru_cache
def get_settings() -> Settings:
return Settings()