24 lines
1.1 KiB
PowerShell
24 lines
1.1 KiB
PowerShell
# 简单检查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
|
||
|