dev 分支暂存
This commit is contained in:
+64
-1
@@ -1,6 +1,8 @@
|
||||
# docker-compose.dev.yml (开发环境 - 一键启动所有服务)
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# ========== 基础设施 ==========
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg16
|
||||
environment:
|
||||
@@ -11,7 +13,11 @@ services:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- ./backend/data/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U cyrene -d cyrene_ai"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
@@ -19,6 +25,11 @@ services:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
qdrant:
|
||||
image: qdrant/qdrant:latest
|
||||
@@ -46,6 +57,58 @@ services:
|
||||
- "4222:4222"
|
||||
- "8222:8222"
|
||||
|
||||
# ========== 后端服务 ==========
|
||||
ai-core:
|
||||
build:
|
||||
context: ./backend/ai-core
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
AI_CORE_PORT: "8081"
|
||||
PERSONA_DIR: "./internal/persona"
|
||||
LLM_API_URL: ${LLM_API_URL:-https://api.openai.com/v1}
|
||||
LLM_API_KEY: ${LLM_API_KEY:-sk-xxxxx}
|
||||
LLM_MODEL: ${LLM_MODEL:-gpt-4o}
|
||||
LLM_FALLBACK_MODEL: ${LLM_FALLBACK_MODEL:-gpt-4o-mini}
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_DB: cyrene_ai
|
||||
ports:
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
gateway:
|
||||
build:
|
||||
context: ./backend/gateway
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
GATEWAY_PORT: "8080"
|
||||
ENV: development
|
||||
JWT_SECRET: ${JWT_SECRET:-dev-secret-change-in-production}
|
||||
JWT_EXPIRY_HOURS: "720"
|
||||
AI_CORE_URL: http://ai-core:8081
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_DB: cyrene_ai
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ai-core:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
redis_data:
|
||||
|
||||
Reference in New Issue
Block a user