-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
189 lines (179 loc) · 5.36 KB
/
docker-compose.yml
File metadata and controls
189 lines (179 loc) · 5.36 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: quantforge-ai
# =============================================================================
# INFRASTRUCTURE SERVICES ONLY
# Backend runs locally with: uvicorn backend.main:app --reload
# =============================================================================
services:
# ============================================
# REDIS - Cache, Rate Limiting, Task Queue
# ============================================
redis:
image: redis:7-alpine
container_name: quantforge-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# ============================================
# MINIO - Object Storage (S3-compatible)
# ============================================
minio:
image: minio/minio:latest
container_name: quantforge-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-quantforge}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:-quantforge123}
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# ============================================
# WEAVIATE - Vector Database
# ============================================
weaviate:
image: semitechnologies/weaviate:1.24.1
container_name: quantforge-weaviate
ports:
- "8080:8080"
- "50051:50051"
environment:
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true"
PERSISTENCE_DATA_PATH: "/var/lib/weaviate"
DEFAULT_VECTORIZER_MODULE: "none"
ENABLE_MODULES: ""
CLUSTER_HOSTNAME: "node1"
volumes:
- weaviate_data:/var/lib/weaviate
healthcheck:
test: [ "CMD-SHELL", "wget -q --spider http://localhost:8080/v1/.well-known/ready || exit 1" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
restart: unless-stopped
# ============================================
# TIMESCALEDB - Time-Series Database
# ============================================
timescale:
image: timescale/timescaledb:latest-pg15
container_name: quantforge-timescale
ports:
- "5433:5432"
environment:
POSTGRES_USER: ${TIMESCALE_USER:-quantforge}
POSTGRES_PASSWORD: ${TIMESCALE_PASSWORD:-quantforge123}
POSTGRES_DB: ${TIMESCALE_DB:-market_data}
volumes:
- timescale_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U quantforge -d market_data" ]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# ============================================
# OLLAMA - Local LLM Inference
# ============================================
ollama:
image: ollama/ollama:latest
container_name: quantforge-ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
# GPU support (uncomment for NVIDIA GPU)
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
healthcheck:
test: [ "CMD", "ollama", "list" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: unless-stopped
# ============================================
# BACKEND - COMMENTED OUT (Run locally)
# Run with: uvicorn backend.main:app --reload
# ============================================
# backend:
# build:
# context: .
# dockerfile: Dockerfile
# container_name: quantforge-backend
# ports:
# - "8000:8000"
# environment:
# - REDIS_HOST=redis
# - REDIS_PORT=6379
# - MINIO_ENDPOINT=minio:9000
# - WEAVIATE_URL=http://weaviate:8080
# - TIMESCALE_HOST=timescale
# - TIMESCALE_PORT=5432
# - OLLAMA_URL=http://ollama:11434
# env_file:
# - .env
# volumes:
# - ./backend:/app/backend
# depends_on:
# redis:
# condition: service_healthy
# minio:
# condition: service_healthy
# weaviate:
# condition: service_started
# timescale:
# condition: service_healthy
# command: uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload
# restart: unless-stopped
# ============================================
# CELERY WORKER - COMMENTED OUT (Run locally)
# Run with: celery -A backend.workers.celery_app worker --loglevel=info
# ============================================
# celery-worker:
# build:
# context: .
# dockerfile: Dockerfile
# container_name: quantforge-celery
# environment:
# - REDIS_HOST=redis
# - CELERY_BROKER_URL=redis://redis:6379/1
# - CELERY_RESULT_BACKEND=redis://redis:6379/2
# env_file:
# - .env
# volumes:
# - ./backend:/app/backend
# depends_on:
# redis:
# condition: service_healthy
# command: celery -A backend.workers.celery_app worker --loglevel=info
# restart: unless-stopped
volumes:
redis_data:
minio_data:
weaviate_data:
timescale_data:
ollama_data:
networks:
default:
name: quantforge-network