first commit
This commit is contained in:
53
app/config.py
Normal file
53
app/config.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import List
|
||||
import os
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Application
|
||||
APP_NAME: str = "VConnect API"
|
||||
APP_VERSION: str = "1.0.0"
|
||||
DEBUG: bool = True
|
||||
API_V1_PREFIX: str = "/api"
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = "sqlite:///./vconnect.db"
|
||||
|
||||
# JWT
|
||||
JWT_SECRET_KEY: str = "your-secret-key-change-in-production"
|
||||
JWT_ALGORITHM: str = "HS256"
|
||||
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
JWT_REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
|
||||
# Proxmox
|
||||
PROXMOX_HOST: str = "https://pve.mouse84.com:8006"
|
||||
PROXMOX_API_TOKEN: str = ""
|
||||
PROXMOX_VERIFY_SSL: bool = False
|
||||
|
||||
# SSH Gateway
|
||||
SSH_HOST: str = ""
|
||||
SSH_PORT: int = 22
|
||||
SSH_USERNAME: str = ""
|
||||
SSH_KEY_PATH: str = ""
|
||||
SSH_PASSWORD: str = ""
|
||||
|
||||
# Tunnel Port Range
|
||||
TUNNEL_PORT_MIN: int = 50000
|
||||
TUNNEL_PORT_MAX: int = 60000
|
||||
|
||||
# CORS
|
||||
CORS_ORIGINS: List[str] = ["http://localhost:8080", "http://localhost:3000"]
|
||||
|
||||
# Logging
|
||||
LOG_LEVEL: str = "INFO"
|
||||
LOG_FILE: str = "logs/vconnect.log"
|
||||
|
||||
# Admin
|
||||
ADMIN_USERNAME: str = "admin"
|
||||
ADMIN_PASSWORD: str = "admin123"
|
||||
ADMIN_EMAIL: str = "admin@example.com"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = True
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user