Files
SatoNano/config.yaml.example
2026-01-06 23:49:23 +08:00

68 lines
2.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =============================================================================
# 安全配置
# =============================================================================
secret_key: CHANGE-THIS-SECRET-KEY-IN-PRODUCTION
algorithm: HS256
access_token_expire_minutes: 30
refresh_token_expire_days: 7
# =============================================================================
# 数据库配置
# =============================================================================
database_type: sqlite
database_host: localhost
database_port: 3306
database_name: satonano
database_username: satonano
database_password: your_password_here
database_echo: false
# SQLite 专用(当 database_type=sqlite 时使用)
database_sqlite_path: ./satonano.db
# =============================================================================
# OAuth2 配置 (Linux.do)
# =============================================================================
oauth2_client_id: your_client_id
oauth2_client_secret: your_client_secret
# 回调路径指向前端页面非后端API
# 开发环境在 OAuth2 提供商处配置为: http://localhost:3000/oauth2/callback
# 生产环境在 OAuth2 提供商处配置为: https://your-domain.com/oauth2/callback
oauth2_callback_path: /oauth2/callback
# 首选端点
oauth2_authorize_endpoint: https://connect.linux.do/oauth2/authorize
oauth2_token_endpoint: https://connect.linux.do/oauth2/token
oauth2_user_info_endpoint: https://connect.linux.do/api/user
# 备用端点(首选不可达时自动回退)
oauth2_authorize_endpoint_reserve: https://connect.linuxdo.org/oauth2/authorize
oauth2_token_endpoint_reserve: https://connect.linuxdo.org/oauth2/token
oauth2_user_info_endpoint_reserve: https://connect.linuxdo.org/api/user
# 请求超时(秒)
oauth2_request_timeout: 10
# =============================================================================
# 密码策略
# =============================================================================
password_min_length: 8
password_max_length: 128
password_require_uppercase: true
password_require_lowercase: true
password_require_digit: true
password_require_special: false
# =============================================================================
# 用户名策略
# =============================================================================
username_min_length: 3
username_max_length: 32
# =============================================================================
# 前端静态文件配置
# =============================================================================
# 前端构建产物的路径(相对于项目根目录或绝对路径)
# Next.js 静态导出: ./frontend/out
# Vite 构建: ./frontend/dist
frontend_static_path: ./frontend/out