管理员默认密码 admin/admin,首次登录强制改密码;增加服务器部署配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fish
2026-05-03 17:44:08 +08:00
parent ff09715511
commit d742d4972c
14 changed files with 350 additions and 49 deletions

View File

@@ -11,8 +11,6 @@ type Config struct {
DatabaseURL string
AuthDBPath string
JWTSecret []byte
AdminUser string
AdminPass string
TushareAPIURL string
}
@@ -21,8 +19,6 @@ func Load() (*Config, error) {
ListenAddr: getenv("LISTEN_ADDR", ":8080"),
DatabaseURL: os.Getenv("DATABASE_URL"),
AuthDBPath: getenv("AUTH_DB_PATH", "/app/auth/auth.db"),
AdminUser: strings.TrimSpace(os.Getenv("ADMIN_USER")),
AdminPass: os.Getenv("ADMIN_PASS"),
TushareAPIURL: getenv("TUSHARE_API_URL", "http://tushare:8000"),
}
if cfg.DatabaseURL == "" {