- scripts/deploy/deploy_crm_only.sh: 单进程部署 sub2api-cn-relay-manager
CRM 控制面到 remote43,不依赖 sub2api host / PG / Redis 容器。
复用 scripts/deploy/remote43_patched_stack_lib.sh 的 env 渲染
(render_remote43_crm_env),render_crm_only_bootstrap 用 $\{VAR\} 占位符 +
sed 注入避开 set -u + unquoted-heredoc 边缘问题。
部署前先 kill 老进程 (再 scp 二进制) 避免 ELF overwrite 失败。
- docs/DEPLOYMENT.md: 加 '在线部署节点' 段,记录 stack / 端口 / 入口 / 验证。
- docs/EXECUTION_BOARD.md: 顶部加 'Latest Online Stack' 段。
- artifacts/online-deploy-20260602/: 本次真实部署的证据
- 01-local-build.txt: 本地 server 二进制 md5 + git head
- 02-remote-inspect.txt: 远端 process / port / db tables
- 03-crm-api-checks.txt: /healthz /api/packs /api/hosts /metrics 真实响应
- 04-portal-public.txt: sub.tksea.top 公共入口
- 05-quality-gates.txt: gofmt / vet / test -race / integration
- manifest.json: 结构化汇总
验证(2026-06-02 21:32-21:43):
- /healthz: HTTP 200 'ok'
- /api/packs (Bearer): HTTP 200 '{"packs":[]}'
- /api/hosts (Bearer): HTTP 200 '{"hosts":[]}'
- /api/packs (no auth): HTTP 401
- /metrics (Prometheus): HTTP 200,含 active_hosts/active_providers/
db_connections_active + Go runtime
- sub.tksea.top/portal/: HTTP 200
- sub.tksea.top/portal-admin-api/healthz: HTTP 200 'ok'(反代到 CRM)
- go test -race ./internal/... ./tests/integration/...: PASS
- gofmt / go vet: 干净
46 lines
1.5 KiB
JSON
46 lines
1.5 KiB
JSON
{
|
|
"deployment_id": "online-deploy-20260602",
|
|
"timestamp": "2026-06-02T21:38:32.454841",
|
|
"git_head": "4ec9dad44f6768368c2aa782ed96d36355709823 test: 修 build-broken edge-case 测试",
|
|
"stack": "crm-only-20260602_18190",
|
|
"remote_host": "ubuntu@43.155.133.187",
|
|
"crm_port": 18190,
|
|
"crm_base_url": "http://127.0.0.1:18190",
|
|
"crm_admin_token_in": "/tmp/crm-only-20260602.env",
|
|
"public_portal_url": "https://sub.tksea.top/portal/",
|
|
"public_admin_api_proxy": "https://sub.tksea.top/portal-admin-api/",
|
|
"local_build_md5": "731f3d4020ab984cfc1bc2bb03381a7a /home/long/project/sub2api-cn-relay-manager/server",
|
|
"local_build_size_bytes": 16171170,
|
|
"remote_binary_md5": "731f3d4020ab984cfc1bc2bb03381a7a",
|
|
"remote_pid": 3419778,
|
|
"portal_checks": {
|
|
"/portal/": "200 67838b",
|
|
"/portal/admin/": "200 13681b",
|
|
"/portal/admin/providers.html": "200 53767b",
|
|
"/portal/admin/batch-import.html": "200 1150b",
|
|
"/portal-admin-api/healthz": "200 2b",
|
|
"/portal-admin-api/api/packs": "401 83b"
|
|
},
|
|
"quality_gates": {
|
|
"gofmt": "(clean)",
|
|
"go_vet": "(no warnings)",
|
|
"go_test_race": "PASS",
|
|
"integration": "PASS"
|
|
},
|
|
"files": [
|
|
"01-local-build.txt",
|
|
"02-remote-inspect.txt",
|
|
"03-crm-api-checks.txt",
|
|
"04-portal-public.txt",
|
|
"05-quality-gates.txt"
|
|
],
|
|
"api_check_summary": {
|
|
"healthz_200": true,
|
|
"packs_empty_array": true,
|
|
"hosts_empty_array": true,
|
|
"metrics_active_hosts": true,
|
|
"metrics_prometheus_format": true,
|
|
"no_auth_blocked": true
|
|
},
|
|
"api_check_all_pass": true
|
|
} |