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
73 lines
1.2 KiB
Bash
73 lines
1.2 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# 鈿狅笍 鍏抽敭锛氫笉缁欓粯璁ゅ€硷紝寮哄埗鍦?SAE 鎺у埗鍙伴厤缃?
|
|
# 濡傛灉鏈厤缃紝鎶ラ敊閫€鍑猴紙閬垮厤浣跨敤閿欒鐨勫悗绔湴鍧€锛?
|
|
if [ -z "$BACKEND_SERVICE_HOST" ]; then
|
|
echo "鉂?ERROR: BACKEND_SERVICE_HOST environment variable is required!"
|
|
echo "Please configure it in SAE console with backend internal IP (e.g., 172.17.x.x)"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$BACKEND_SERVICE_PORT" ]; then
|
|
echo "鈿狅笍 WARNING: BACKEND_SERVICE_PORT not set, using default: 3001"
|
|
export BACKEND_SERVICE_PORT=3001
|
|
fi
|
|
|
|
echo "============================================"
|
|
echo "Starting Frontend Nginx Service"
|
|
echo "Backend Service: ${BACKEND_SERVICE_HOST}:${BACKEND_SERVICE_PORT}"
|
|
echo "Container Timezone: $(cat /etc/timezone)"
|
|
echo "Current Time: $(date)"
|
|
echo "============================================"
|
|
|
|
# 浣跨敤 envsubst 鏇挎崲 Nginx 閰嶇疆涓殑鐜鍙橀噺
|
|
envsubst '${BACKEND_SERVICE_HOST} ${BACKEND_SERVICE_PORT}' \
|
|
< /etc/nginx/templates/nginx.conf.template \
|
|
> /etc/nginx/nginx.conf
|
|
|
|
# 楠岃瘉 Nginx 閰嶇疆
|
|
nginx -t
|
|
|
|
# 鍚姩 Nginx
|
|
exec nginx -g 'daemon off;'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|