first commit
This commit is contained in:
41
app/config/settings.py
Normal file
41
app/config/settings.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = "BenyaMessenger"
|
||||
environment: str = "development"
|
||||
debug: bool = True
|
||||
api_v1_prefix: str = "/api/v1"
|
||||
auto_create_tables: bool = True
|
||||
|
||||
secret_key: str = Field(default="change-me-please-12345", min_length=16)
|
||||
access_token_expire_minutes: int = 30
|
||||
refresh_token_expire_days: int = 30
|
||||
jwt_algorithm: str = "HS256"
|
||||
email_verification_token_expire_hours: int = 24
|
||||
password_reset_token_expire_hours: int = 1
|
||||
|
||||
postgres_dsn: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/messenger"
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
s3_endpoint_url: str = "http://localhost:9000"
|
||||
s3_access_key: str = "minioadmin"
|
||||
s3_secret_key: str = "minioadmin"
|
||||
s3_region: str = "us-east-1"
|
||||
s3_bucket_name: str = "messenger-media"
|
||||
s3_presign_expire_seconds: int = 900
|
||||
max_upload_size_bytes: int = 104857600
|
||||
frontend_base_url: str = "http://localhost:5173"
|
||||
|
||||
smtp_host: str = "localhost"
|
||||
smtp_port: int = 1025
|
||||
smtp_username: str = ""
|
||||
smtp_password: str = ""
|
||||
smtp_use_tls: bool = False
|
||||
smtp_from_email: str = "no-reply@benyamessenger.local"
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user