dev 分支暂存
This commit is contained in:
+48
-14
@@ -2,6 +2,7 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# ========== 反向代理 ==========
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
ports:
|
||||
@@ -10,45 +11,78 @@ services:
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy_data:/data
|
||||
depends_on:
|
||||
- gateway
|
||||
restart: unless-stopped
|
||||
|
||||
# ========== 后端服务 ==========
|
||||
gateway:
|
||||
build: ./backend/gateway
|
||||
environment:
|
||||
- ENV=production
|
||||
- POSTGRES_HOST=postgres
|
||||
- REDIS_HOST=redis
|
||||
# ... 其他环境变量
|
||||
GATEWAY_PORT: "8080"
|
||||
ENV: production
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRY_HOURS: "720"
|
||||
AI_CORE_URL: http://ai-core:8081
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: ${POSTGRES_USER:-cyrene}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-cyrene_ai}
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
ai-core:
|
||||
build: ./backend/ai-core
|
||||
environment:
|
||||
- ENV=production
|
||||
# ... 其他环境变量
|
||||
AI_CORE_PORT: "8081"
|
||||
PERSONA_DIR: "./internal/persona"
|
||||
LLM_API_URL: ${LLM_API_URL}
|
||||
LLM_API_KEY: ${LLM_API_KEY}
|
||||
LLM_MODEL: ${LLM_MODEL:-gpt-4o}
|
||||
LLM_FALLBACK_MODEL: ${LLM_FALLBACK_MODEL:-gpt-4o-mini}
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: ${POSTGRES_USER:-cyrene}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-cyrene_ai}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- qdrant
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
# ========== 基础设施 ==========
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg16
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- ./backend/data/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-cyrene}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: cyrene_ai
|
||||
POSTGRES_DB: ${POSTGRES_DB:-cyrene_ai}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cyrene} -d ${POSTGRES_DB:-cyrene_ai}"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
qdrant:
|
||||
|
||||
Reference in New Issue
Block a user