feat(iit): Complete IIT Manager Agent Day 1 - Environment initialization and WeChat integration
Summary: - Complete IIT Manager Agent MVP Day 1 (12.5% progress) - Database: Create iit_schema with 5 tables (IitProject, IitPendingAction, IitTaskRun, IitUserMapping, IitAuditLog) - Backend: Add module structure (577 lines) and types (223 lines) - WeChat: Configure Enterprise WeChat app (CorpID, AgentID, Secret) - WeChat: Obtain web authorization and JS-SDK authorization - WeChat: Configure trusted domain (iit.xunzhengyixue.com) - Frontend: Deploy v1.2 with WeChat domain verification file - Frontend: Fix CRLF issue in docker-entrypoint.sh (CRLF -> LF) - Testing: 11/11 database CRUD tests passed - Testing: Access Token retrieval test passed - Docs: Create module status and development guide - Docs: Update MVP task list with Day 1 completion - Docs: Rename deployment doc to SAE real-time status record - Deployment: Update frontend internal IP to 172.17.173.80 Technical Details: - Prisma: Multi-schema support (iit_schema) - pg-boss: Job queue integration prepared - Taro 4.x: Framework selected for WeChat Mini Program - Shadow State: Architecture foundation laid - Docker: Fix entrypoint script line endings for Linux container Status: Day 1/14 complete, ready for Day 2 REDCap integration
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# ⚠️ 关键:不给默认值,强制在 SAE 控制台配置
|
||||
# 如果未配置,报错退出(避免使用错误的后端地址)
|
||||
# 鈿狅笍 鍏抽敭锛氫笉缁欓粯璁ゅ€硷紝寮哄埗鍦?SAE 鎺у埗鍙伴厤缃?
|
||||
# 濡傛灉鏈厤缃紝鎶ラ敊閫€鍑猴紙閬垮厤浣跨敤閿欒鐨勫悗绔湴鍧€锛?
|
||||
if [ -z "$BACKEND_SERVICE_HOST" ]; then
|
||||
echo "❌ ERROR: BACKEND_SERVICE_HOST environment variable is required!"
|
||||
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"
|
||||
echo "鈿狅笍 WARNING: BACKEND_SERVICE_PORT not set, using default: 3001"
|
||||
export BACKEND_SERVICE_PORT=3001
|
||||
fi
|
||||
|
||||
@@ -21,15 +21,15 @@ echo "Container Timezone: $(cat /etc/timezone)"
|
||||
echo "Current Time: $(date)"
|
||||
echo "============================================"
|
||||
|
||||
# 使用 envsubst 替换 Nginx 配置中的环境变量
|
||||
# 浣跨敤 envsubst 鏇挎崲 Nginx 閰嶇疆涓殑鐜鍙橀噺
|
||||
envsubst '${BACKEND_SERVICE_HOST} ${BACKEND_SERVICE_PORT}' \
|
||||
< /etc/nginx/templates/nginx.conf.template \
|
||||
> /etc/nginx/nginx.conf
|
||||
|
||||
# 验证 Nginx 配置
|
||||
# 楠岃瘉 Nginx 閰嶇疆
|
||||
nginx -t
|
||||
|
||||
# 启动 Nginx
|
||||
# 鍚姩 Nginx
|
||||
exec nginx -g 'daemon off;'
|
||||
|
||||
|
||||
@@ -42,3 +42,4 @@ exec nginx -g 'daemon off;'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user