feat: add app update checks and standalone release publishing panel

This commit is contained in:
Codex
2026-10-24 13:50:42 +08:00
parent 437ed14dbe
commit 75e0b5587d
27 changed files with 1566 additions and 7 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Run interactively on your server; do not send its output to chat."""
import getpass
import secrets
from update_service import hash_password
if __name__ == '__main__':
password = getpass.getpass('设置更新后台密码(至少12位): ')
if password != getpass.getpass('再次输入: '):
raise SystemExit('两次输入不一致,未生成配置。')
try:
password_hash = hash_password(password)
except ValueError as error:
raise SystemExit(str(error)) from None
print('仅在服务器填写下面两行到.env,保留单引号,不要发到聊天:')
print(f"ADMIN_PASSWORD_HASH='{password_hash}'")
print(f"SESSION_SECRET='{secrets.token_hex(32)}'")