v1.0.0 高考志愿门户完整修复

变更摘要:
- [fix] 清理根目录 index.html 遗留代码(questionnaire-error + retryLoad 移除)
- [fix] 副标题同步更新为自估591分 + 候选志愿546条数据校准
- [fix] 页脚注入版本号 v1.0.0
- [fix] 部署版 index.html: 取消家长标签,统一 filler-tianheng
- [fix] Dashboard 文案修正(4份→2份线上问卷)
- [fix] 清理冗余部署脚本(v1-v4归档至 archived_scripts/)
- [fix] 等效位次工具纳入 deploy 目录
- [chore] .gitignore 初始化
- [init] Git 仓库初始化
This commit is contained in:
2026-06-24 13:11:34 +08:00
commit b6df028839
71 changed files with 22898 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
import paramiko, time
NAS_HOST = "100.85.152.112"
NAS_PORT = 22
NAS_USER = "simon"
NAS_PASS = "Nas82829330"
NAS_DEPLOY_PATH = "/volume1/docker/gaokao-portal"
DOCKER_BIN = "/usr/local/bin/docker"
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect(NAS_HOST, NAS_PORT, NAS_USER, NAS_PASS, timeout=20)
def shell(cmd):
transport = c.get_transport()
ch = transport.open_session()
ch.get_pty()
ch.exec_command(cmd)
out = b""
while True:
if ch.recv_ready():
out += ch.recv(4096)
if ch.exit_status_ready():
break
time.sleep(0.3)
while ch.recv_ready():
out += ch.recv(4096)
return out.decode()
# 手动构建 compose 命令
CMD = f"echo '{NAS_PASS}' | sudo -S {DOCKER_BIN} compose -f {NAS_DEPLOY_PATH}/docker-compose.yml"
# 启动所有容器
print("启动容器...")
print(shell(f"{CMD} up -d"))
time.sleep(20)
# 检查状态
print(shell(f"{CMD} ps"))
# 检查日志
print("\n--- 后端日志 ---")
print(shell(f"{CMD} logs backend | tail -20"))
# 测试 API
print("\n--- API 测试 ---")
print(shell("curl -s http://localhost:8080/api/questionnaires | head -c 500"))
c.close()