-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
160 lines (151 loc) · 3.95 KB
/
docker-compose.yml
File metadata and controls
160 lines (151 loc) · 3.95 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: '3.8'
services:
# Main AI Automation Framework service
ai-automation:
build:
context: .
dockerfile: Dockerfile
container_name: ai-automation-framework
restart: unless-stopped
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- CHROMA_PERSIST_DIRECTORY=/app/data/chroma
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- LOG_FILE=/app/logs/app.log
- REDIS_URL=redis://redis:6379
- POSTGRES_URL=postgresql://postgres:postgres@postgres:5432/ai_automation
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./cache:/app/cache
- ./.env:/app/.env
ports:
- "8000:8000"
- "8501:8501"
depends_on:
- redis
- postgres
- chroma
networks:
- ai-automation-network
healthcheck:
test: ["CMD", "python", "-c", "import ai_automation_framework; print('OK')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Redis for caching and message queue
redis:
image: redis:7-alpine
container_name: ai-automation-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- ai-automation-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# PostgreSQL for persistent data
postgres:
image: postgres:15-alpine
container_name: ai-automation-postgres
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=ai_automation
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- ai-automation-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# ChromaDB for vector storage
chroma:
image: ghcr.io/chroma-core/chroma:latest
container_name: ai-automation-chroma
restart: unless-stopped
ports:
- "8001:8000"
volumes:
- chroma-data:/chroma/chroma
environment:
- IS_PERSISTENT=TRUE
- ANONYMIZED_TELEMETRY=${ANONYMIZED_TELEMETRY:-TRUE}
networks:
- ai-automation-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/heartbeat"]
interval: 30s
timeout: 10s
retries: 3
# Prometheus for metrics
prometheus:
image: prom/prometheus:latest
container_name: ai-automation-prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./deployment/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
networks:
- ai-automation-network
# Grafana for visualization
grafana:
image: grafana/grafana:latest
container_name: ai-automation-grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_INSTALL_PLUGINS=redis-datasource
volumes:
- grafana-data:/var/lib/grafana
- ./deployment/grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./deployment/grafana/datasources:/etc/grafana/provisioning/datasources
depends_on:
- prometheus
networks:
- ai-automation-network
# Nginx reverse proxy (optional)
nginx:
image: nginx:alpine
container_name: ai-automation-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./deployment/nginx.conf:/etc/nginx/nginx.conf
- ./deployment/ssl:/etc/nginx/ssl
depends_on:
- ai-automation
networks:
- ai-automation-network
networks:
ai-automation-network:
driver: bridge
volumes:
redis-data:
postgres-data:
chroma-data:
prometheus-data:
grafana-data: