-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (100 loc) · 2.47 KB
/
docker-compose.yml
File metadata and controls
105 lines (100 loc) · 2.47 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
version: "3.9"
services:
# 1. Backend
backend:
image: ghcr.io/sarfraspc/cap-backend:latest
build:
context: .
dockerfile: infrastructure/Dockerfile.backend
container_name: cap-backend
env_file: .env.docker
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
qdrant:
condition: service_started
mlflow:
condition: service_started
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- ./secrets:/secrets:ro
ports:
- "8000:8000"
# 2. Database (TimescaleDB)
db:
image: timescale/timescaledb:latest-pg14
container_name: cap-db
environment:
POSTGRES_USER: ${DB_SUPERUSER}
POSTGRES_PASSWORD: ${DB_SUPERUSER_PASSWORD}
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./infrastructure/script.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# 3. Redis
redis:
image: redis:7
container_name: cap-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
# 4. Qdrant
qdrant:
image: qdrant/qdrant:v1.11.0
container_name: cap-qdrant
ports:
- "6333:6333"
volumes:
- qdrant_storage:/qdrant/storage
restart: unless-stopped
# 5. MLflow
mlflow:
image: ghcr.io/sarfraspc/cap-mlflow:latest
build:
context: .
dockerfile: infrastructure/Dockerfile.mlflow
container_name: cap-mlflow
env_file: .env.docker
depends_on:
db:
condition: service_healthy
environment:
GOOGLE_APPLICATION_CREDENTIALS: /secrets/service-account.json
entrypoint: ["mlflow"]
command:
[
"server",
"--backend-store-uri", "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/metadata_db",
"--default-artifact-root", "${MLFLOW_ARTIFACT_ROOT}",
"--host", "0.0.0.0",
"--port", "5000",
"--allowed-hosts", "*",
"--cors-allowed-origins", "*"
]
volumes:
- ./secrets:/secrets:ro
ports:
- "5000:5000"
restart: unless-stopped
volumes:
postgres_data:
redis_data:
qdrant_storage: