Files
inquiry_robot/deploy/_remote_cfg_check.ps1
T

14 lines
600 B
PowerShell

# 检查 config overlay 是否含 redis username,以及最近失败原因
$ErrorActionPreference = 'Continue'
$cfg = 'E:\wwwroot\inquiry-new\config\application-inquiry.yml'
Write-Output '=== config exists ==='
Test-Path $cfg
if (Test-Path $cfg) {
Get-Content $cfg | Select-Object -First 25
}
Write-Output '=== log markers ==='
Select-String -Path 'E:\wwwroot\inquiry-new\logs\stdout.log' -Pattern 'WRONGPASS|redisContainer|Started Jeecg|Application run failed' |
Select-Object -Last 12 |
ForEach-Object { $_.Line.Substring(0, [Math]::Min(220, $_.Line.Length)) }
Write-Output 'CFG_CHECK_DONE'