Summary: - Migrate PostgreSQL to pgvector/pgvector:pg15 Docker image - Successfully install and verify pgvector 0.8.1 extension - Create comprehensive Dify-to-pgvector migration plan - Update PKB module documentation with pgvector status - Update system documentation with pgvector integration Key changes: - docker-compose.yml: Switch to pgvector/pgvector:pg15 image - Add EkbDocument and EkbChunk data model design - Design R-C-R-G hybrid retrieval architecture - Add clinical data JSONB fields (pico, studyDesign, regimen, safety, criteria, endpoints) - Create detailed 10-day implementation roadmap Documentation updates: - PKB module status: pgvector RAG infrastructure ready - System status: pgvector 0.8.1 integrated - New: Dify replacement development plan (01-Dify替换为pgvector开发计划.md) - New: Enterprise medical knowledge base solution V2 Tested: PostgreSQL with pgvector verified, frontend and backend functionality confirmed
87 lines
1.8 KiB
PowerShell
87 lines
1.8 KiB
PowerShell
#!/usr/bin/env pwsh
|
||
# REDCap Docker日志查看脚本
|
||
# 版本:v1.0
|
||
# 日期:2026-01-01
|
||
|
||
param(
|
||
[string]$Service = "", # 指定服务名(redcap-web, redcap-db, phpmyadmin)
|
||
[switch]$Follow, # 实时跟踪日志
|
||
[int]$Tail = 50 # 显示最近N行日志
|
||
)
|
||
|
||
Write-Host "📝 REDCap Docker日志" -ForegroundColor Cyan
|
||
Write-Host ""
|
||
|
||
# 切换到项目目录
|
||
$ScriptDir = Split-Path -Parent $PSCommandPath
|
||
$ProjectDir = Split-Path -Parent $ScriptDir
|
||
Set-Location $ProjectDir
|
||
|
||
# 构建docker-compose logs命令
|
||
$logCmd = "docker-compose logs"
|
||
|
||
if ($Follow) {
|
||
$logCmd += " -f"
|
||
} else {
|
||
$logCmd += " --tail=$Tail"
|
||
}
|
||
|
||
if ($Service) {
|
||
$logCmd += " $Service"
|
||
Write-Host "查看服务:$Service" -ForegroundColor Yellow
|
||
} else {
|
||
Write-Host "查看所有服务日志" -ForegroundColor Yellow
|
||
}
|
||
|
||
if ($Follow) {
|
||
Write-Host "实时跟踪模式(按Ctrl+C退出)" -ForegroundColor Gray
|
||
} else {
|
||
Write-Host "显示最近 $Tail 行日志" -ForegroundColor Gray
|
||
}
|
||
|
||
Write-Host ""
|
||
Write-Host "============================================" -ForegroundColor Gray
|
||
|
||
# 执行命令
|
||
Invoke-Expression $logCmd
|
||
|
||
Write-Host ""
|
||
Write-Host "💡 提示:" -ForegroundColor Cyan
|
||
Write-Host " • 查看特定服务:.\scripts\logs-redcap.ps1 -Service redcap-web" -ForegroundColor Gray
|
||
Write-Host " • 实时跟踪:.\scripts\logs-redcap.ps1 -Follow" -ForegroundColor Gray
|
||
Write-Host " • 显示更多行:.\scripts\logs-redcap.ps1 -Tail 100" -ForegroundColor Gray
|
||
Write-Host ""
|
||
Write-Host "可用服务名:" -ForegroundColor Cyan
|
||
Write-Host " • redcap-web(REDCap Web服务)" -ForegroundColor Gray
|
||
Write-Host " • redcap-db(MySQL数据库)" -ForegroundColor Gray
|
||
Write-Host " • phpmyadmin(数据库管理工具)" -ForegroundColor Gray
|
||
Write-Host ""
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|