nomadro/apps/api/services/community_svc/config.py
Eric 6e15868e04 Add isolated 游民社区 (/social) with social_svc and document test5.
Ship portal module + /api/social/v1 SQLite backend separate from /community; update README for MiroTalk CSP and test5 as the next development branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-01 11:24:21 +08:00

48 lines
1.6 KiB
Python

from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
# 忽略 .env 中其它模块键,避免本地/统一 env 拖垮启动(不改业务字段)
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
pocketbase_url: str = "http://127.0.0.1:8090"
pocketbase_admin_email: str = "admin@nomadro.com"
pocketbase_admin_password: str = "Xiao4669805"
api_host: str = "0.0.0.0"
api_port: int = 8000
cors_origins: str = "http://localhost:3000,http://127.0.0.1:3000"
site_base_url: str = "https://nomadweb.nomadro.com"
# SeaweedFS S3 (s3.nomadro.com → 127.0.0.1:8333)
s3_enabled: bool = True
s3_endpoint: str = "http://127.0.0.1:8333"
s3_public_url: str = "https://s3.nomadro.com"
s3_access_key: str = "nomadweb"
s3_secret_key: str = ""
s3_bucket: str = "nomadweb"
s3_region: str = "us-east-1"
s3_upload_prefix: str = "nomadweb"
# ntfy (127.0.0.1:2586 on production server)
ntfy_enabled: bool = False
ntfy_url: str = "http://127.0.0.1:2586"
# Optional Listmonk newsletter (leave empty = store only)
listmonk_url: str = ""
listmonk_user: str = ""
listmonk_password: str = ""
listmonk_list_id: int = 1
# Payment (from env on server)
dev_auto_pay: bool = False
payment_provider: str = "zpay"
mirotalk_url: str = "https://mirotalk.nomadro.com"
lounge_url: str = "https://lounge.nomadro.com"
@property
def cors_origin_list(self) -> list[str]:
return [o.strip() for o in self.cors_origins.split(",") if o.strip()]
settings = Settings()