-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.example.yml
More file actions
230 lines (217 loc) · 5.67 KB
/
docker-compose.dev.example.yml
File metadata and controls
230 lines (217 loc) · 5.67 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
version: '3.8'
services:
db:
image: mysql:8.0
container_name: my_mysql_cosmic_catalyst
restart: always
environment:
MYSQL_ROOT_PASSWORD: "REPLACE_ME" # ← generated dynamically
MYSQL_DATABASE: entities_db
MYSQL_USER: api_user
MYSQL_PASSWORD: "REPLACE_ME" # ← generated dynamically
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
networks:
- my_custom_network
qdrant:
image: qdrant/qdrant:latest
container_name: qdrant_server
restart: always
ports:
- "6333:6333" # API port
- "6334:6334" # gRPC port
volumes:
- qdrant_storage:/qdrant/storage
environment:
QDRANT__STORAGE__STORAGE_PATH: "/qdrant/storage"
QDRANT__SERVICE__GRPC_PORT: "6334"
QDRANT__LOG_LEVEL: "INFO"
networks:
- my_custom_network
redis:
image: redis:7
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- my_custom_network
browser:
image: ghcr.io/browserless/chromium:latest
container_name: browserless_chromium
restart: always
ports:
- "3000:3000"
environment:
- MAX_CONCURRENT_SESSIONS=10
- CONNECTION_TIMEOUT=60000
networks:
- my_custom_network
searxng:
image: searxng/searxng:latest
container_name: searxng
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./docker/searxng:/etc/searxng
environment:
- SEARXNG_BASE_URL=http://localhost:8080/
- SEARXNG_SECRET_KEY=REPLACE_ME # ← generated dynamically
depends_on:
- redis
networks:
- my_custom_network
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel_collector
restart: always
command: ["--config=/etc/otel-config.yaml"]
volumes:
- ./docker/otel/otel-config.yaml:/etc/otel-config.yaml
ports:
- "4317:4317" # gRPC receiver
- "4318:4318" # HTTP receiver
depends_on:
- jaeger
networks:
- my_custom_network
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger_ui
restart: always
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- "16686:16686" # UI
- "14250:14250" # gRPC collector
networks:
- my_custom_network
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
networks:
- my_custom_network
api:
build:
context: .
dockerfile: docker/api/Dockerfile
container_name: fastapi_cosmic_catalyst
restart: always
env_file:
- .env
environment:
- DATABASE_URL=mysql+pymysql://api_user:REPLACE_ME@db:3306/entities_db
- AUTO_MIGRATE=1
- SANDBOX_SERVER_URL=http://sandbox:8000
- QDRANT_URL=http://qdrant:6333
- REDIS_URL=redis://redis:6379/0
- BROWSER_WS_ENDPOINT=ws://browser:3000
- DEFAULT_SECRET_KEY=REPLACE_ME # ← generated dynamically
- SEARXNG_URL=http://searxng:8080
- OTEL_SERVICE_NAME=api-api
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_TRACES_EXPORTER=otlp
- OTEL_METRICS_EXPORTER=none
- OTEL_LOGS_EXPORTER=none
- OLLAMA_BASE_URL=http://ollama:11434/v1
# Override the host-side SHARED_PATH with the container-internal mount point
# so the purge daemon writes to the same directory the samba container serves
- SHARED_PATH=/app/shared_data
ports:
- "9000:9000"
volumes:
- ./src:/app/src
- ./alembic.ini:/app/alembic.ini
- ./migrations:/app/migrations
# Mount the same host directory that samba exposes — both containers
# now read/write the same files on disk
- ${SHARED_PATH}:/app/shared_data
depends_on:
db:
condition: service_healthy
sandbox:
condition: service_started
qdrant:
condition: service_started
redis:
condition: service_started
browser:
condition: service_started
searxng:
condition: service_started
otel-collector:
condition: service_started
ollama:
condition: service_started
command: ["./wait-for-it.sh", "db:3306", "--", "uvicorn", "entities_api.app:app", "--host", "0.0.0.0", "--port", "9000"]
networks:
- my_custom_network
sandbox:
build:
context: .
dockerfile: docker/sandbox/Dockerfile
container_name: sandbox_api
restart: always
cap_add:
- SYS_ADMIN
security_opt:
- seccomp:unconfined
devices:
- /dev/fuse
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- /tmp/sandbox_logs:/app/logs
env_file:
- .env
networks:
- my_custom_network
samba:
image: dperson/samba
container_name: samba_server
restart: unless-stopped
environment:
USERID: 1000
GROUPID: 1000
TZ: UTC
USER: "samba_user;default"
SHARE: "cosmic_share;/samba/share;yes;no;no;samba_user"
GLOBAL: "server min protocol = NT1\nserver max protocol = SMB3"
ports:
- "139:139"
- "1445:445"
volumes:
- ${SHARED_PATH}:/samba/share
networks:
- my_custom_network
volumes:
mysql_data:
driver: local
qdrant_storage:
driver: local
redis_data:
driver: local
ollama_data:
driver: local
networks:
my_custom_network:
driver: bridge