重构:更新API基础URL并增强内容解析逻辑
- 更改了API基础URL,以便在开发和生产环境之间切换。 - 添加了assetBase参数,以提高内容解析中图像源的分辨率。 - 增强了阅读页面的配置,将assetBase纳入图像URL的配置中。 - 更新了OpenPlatformPage,以便正确导航至设置和API文档。 - 对ContentPage进行了重构,以包含额外的webhook配置检索功能。 - 改进了DashboardPage,使其能更有效地处理用户交互。 - 清理了未使用的导入,并优化了AdminLayout,以提高可读性。
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
soulApp (soul-api) Go 项目一键部署到宝塔(正式环境)
|
||||
soulApi(soul-api 后端)Go 项目一键部署到宝塔(正式环境)
|
||||
- 打包使用 .env.production 作为服务器 .env
|
||||
- 本地交叉编译 Linux 二进制
|
||||
- 上传到 /www/wwwroot/self/soul-api
|
||||
@@ -322,7 +322,7 @@ def upload_and_extract(cfg, tarball_path, no_restart=False, restart_method="auto
|
||||
print(" [成功] 已解压到: %s" % project_path)
|
||||
|
||||
if not no_restart:
|
||||
print("[4/4] 重启 soulApp 服务 ...")
|
||||
print("[4/4] 重启 soulApi 服务 ...")
|
||||
ok = False
|
||||
if restart_method in ("auto", "btapi") and (cfg.get("bt_panel_url") and cfg.get("bt_api_key")):
|
||||
ok = restart_via_bt_api(cfg)
|
||||
@@ -342,7 +342,7 @@ def upload_and_extract(cfg, tarball_path, no_restart=False, restart_method="auto
|
||||
print(" [stderr] %s" % err[:200])
|
||||
ok = "RESTART_OK" in out
|
||||
if ok:
|
||||
print(" [成功] soulApp 已通过 SSH 重启")
|
||||
print(" [成功] soulApi 已通过 SSH 重启")
|
||||
else:
|
||||
print(" [警告] SSH 重启状态未知,请到宝塔 Go 项目里手动点击启动,或执行: cd %s && ./soul-api" % project_path)
|
||||
else:
|
||||
@@ -368,7 +368,7 @@ def upload_and_extract(cfg, tarball_path, no_restart=False, restart_method="auto
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="soulApp (soul-api) Go 项目一键部署到宝塔",
|
||||
description="soulApi(soul-api 后端)Go 项目一键部署到宝塔",
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
parser.add_argument("--no-build", action="store_true", help="跳过本地编译(使用已有 soul-api 二进制)")
|
||||
@@ -387,7 +387,7 @@ def main():
|
||||
|
||||
cfg = get_cfg()
|
||||
print("=" * 60)
|
||||
print(" soulApp 一键部署到宝塔")
|
||||
print(" soulApi(soul-api)一键部署到宝塔")
|
||||
print("=" * 60)
|
||||
print(" 服务器: %s@%s:%s" % (cfg["user"], cfg["host"], DEFAULT_SSH_PORT))
|
||||
print(" 目标目录: %s" % cfg["project_path"])
|
||||
|
||||
Reference in New Issue
Block a user