flnxi-Wu/scripts/tools/check-logo-simple.ps1
WuYongJie d1c6efc79d
Some checks failed
CI Check / check (push) Has been cancelled
feat: NAS 部署与 Harbor 推送流程
2025-12-03 14:39:06 +08:00

24 lines
1.1 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 简单检查Logo配置
param(
[string]$Server = "45.249.208.118",
[string]$Username = "root",
[string]$Password = "lxvhNYFZ4160"
)
$plinkPath = "C:\Program Files\PuTTY\plink.exe"
$hostKey = "SHA256:WZOtvC/+IWw29P8vyovSabmIRFkQ/Bnmhj+qhTshA4Q"
Write-Host "检查数据库中的Logo URL..." -ForegroundColor Cyan
$sql = "SELECT id, \"headerLogoUrl\", \"loginLogoUrl\", \"siteName\" FROM \"SystemSettings\" LIMIT 1;"
$checkCmd = "cd /root/deploy && docker compose exec -T postgres psql -U postgres -d flnxi -c `"$sql`""
& $plinkPath -batch -ssh -hostkey $hostKey -pw $Password "${Username}@${Server}" $checkCmd
Write-Host "`n检查S3_PUBLIC_DOMAIN配置..." -ForegroundColor Cyan
$envCmd = "cd /root/deploy && docker compose exec -T app printenv S3_PUBLIC_DOMAIN"
& $plinkPath -batch -ssh -hostkey $hostKey -pw $Password "${Username}@${Server}" $envCmd
Write-Host "`n问题分析:" -ForegroundColor Yellow
Write-Host "如果S3_PUBLIC_DOMAIN是 http://localhost:9000,这是内网地址,前端无法访问" -ForegroundColor Red
Write-Host "需要修改为公网地址,例如:http://45.249.208.118:9000/youyidian3d" -ForegroundColor Green