Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
app_name: str = "dymini-api"
|
|
debug: bool = True
|
|
api_host: str = "0.0.0.0"
|
|
api_port: int = 8000
|
|
public_api_base: str = "https://dyapi.nomadro.cn"
|
|
admin_origin: str = "https://dyadmin.nomadro.cn"
|
|
cors_origins: str = (
|
|
"https://dyadmin.nomadro.cn,https://dy.nomadro.cn,"
|
|
"http://localhost:5173,http://127.0.0.1:5173,http://localhost:8000"
|
|
)
|
|
|
|
# 抖音小程序
|
|
tt_appid: str = "tt995defe007255b2701"
|
|
tt_secret: str = "8628800c6f2290175180b94e255380c2e9d34dc0"
|
|
tt_allow_devtools_login: bool = True
|
|
# 个人主体暂不确定能否真实支付:默认开启模拟支付
|
|
tt_pay_mock: bool = True
|
|
|
|
jwt_secret: str = "dymini-jwt-2026"
|
|
admin_username: str = "admin"
|
|
admin_password: str = "Xiao4669805"
|
|
|
|
pb_url: str = "http://127.0.0.1:8090"
|
|
pb_admin_email: str = "admin@nomadro.cn"
|
|
pb_admin_password: str = "Xiao4669805"
|
|
use_pocketbase: bool = False
|
|
|
|
sqlite_path: str = "../data/dymini.db"
|
|
|
|
default_product_id: str = "ebook_unlock_default"
|
|
default_price_fen: int = 18800
|
|
# 个人主体暂不能支付:默认全书可读
|
|
default_unlock_percent: int = 100
|
|
|
|
ntfy_enabled: bool = True
|
|
ntfy_base_url: str = "http://127.0.0.1:2586"
|
|
ntfy_topic: str = "dymini"
|
|
ntfy_token: str = ""
|
|
|
|
|
|
settings = Settings()
|