-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (111 loc) · 3.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
123 lines (111 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
services:
# Router Agent - Multi-Agent 시스템의 Orchestrator
router-agent:
build:
context: ./router-agent
dockerfile: Dockerfile
container_name: router-agent
networks:
- agent-network
ports:
- "5000:5000"
environment:
# OpenAI 설정
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4-turbo-preview}
# Router 설정
- ROUTER_TIMEOUT=${ROUTER_TIMEOUT:-300}
- CLASSIFICATION_CONFIDENCE_THRESHOLD=${CLASSIFICATION_CONFIDENCE_THRESHOLD:-0.5}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
# SDB Agent 연결
- SDB_AGENT_URL=http://sdb-agent:5000
# Redis 설정
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
depends_on:
sdb-agent:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# SDB Agent - SDB 개발 및 Material DB 자동화
sdb-agent:
build:
context: ./sdb-agent
dockerfile: Dockerfile
container_name: sdb-agent
networks:
- agent-network
environment:
# Flask 설정
- FLASK_ENV=${FLASK_ENV:-production}
- FLASK_DEBUG=0
# Bitbucket 설정
- BITBUCKET_URL=${BITBUCKET_URL:-https://api.bitbucket.org}
- BITBUCKET_USERNAME=${BITBUCKET_USERNAME}
- BITBUCKET_ACCESS_TOKEN=${BITBUCKET_ACCESS_TOKEN}
- BITBUCKET_WORKSPACE=${BITBUCKET_WORKSPACE}
- BITBUCKET_REPOSITORY=${BITBUCKET_REPOSITORY}
# OpenAI 설정
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_MODEL=${OPENAI_MODEL:-gpt-4-turbo-preview}
# 테스트 모드
- TEST_MODE=${TEST_MODE:-false}
# Redis 설정
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
volumes:
# 개발 중 코드 변경사항 실시간 반영 (옵션)
- ./sdb-agent/app:/app/app:ro
- ./sdb-agent/few_shot_examples.json:/app/few_shot_examples.json:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Redis - 캐싱 (Phase 2)
redis:
image: redis:7.2-alpine
container_name: redis-cache
networks:
- agent-network
ports:
- "6379:6379"
command: redis-server --maxmemory 512mb --maxmemory-policy allkeys-lru
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
- redis-data:/data
# Cloudflare Tunnel (옵션: 외부 접근용)
cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared-tunnel
networks:
- agent-network
command: tunnel --no-autoupdate --url http://router-agent:5000
depends_on:
router-agent:
condition: service_healthy
restart: unless-stopped
profiles:
- cloudflare
networks:
agent-network:
driver: bridge
name: multi-agent-network
volumes:
redis-data:
name: redis-cache-data