-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
114 lines (107 loc) · 2.29 KB
/
compose.yaml
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
version: "3.3"
services:
api:
build:
context: .
dockerfile: ./docker/Dockerfile.fastapi
container_name: fastapi
ports:
- "8081:8081"
depends_on:
- airflow
networks:
- frontend
- backend
env_file:
- ./access_token.env
airflow:
build:
context: .
dockerfile: ./docker/Dockerfile.airflow
container_name: airflow
ports:
- "8080:8080"
depends_on:
- mlflow
volumes:
- ./dags:/opt/airflow/dags
networks:
- frontend
- backend
command: standalone
env_file:
- ./access_token.env
mlflow:
restart: always
build:
context: .
dockerfile: ./docker/Dockerfile.mlflow
container_name: mlflow_server
depends_on:
- db
ports:
- "5000:5000"
networks:
- frontend
- backend
environment:
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- MLFLOW_S3_ENDPOINT_URL=http://s3:9000
- MLFLOW_S3_IGNORE_TLS=true
command: >
mlflow server
--backend-store-uri postgresql://mlflow:mlflow@db:5432/mlflow
--host 0.0.0.0
--artifacts-destination s3://mlflow
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
interval: 30s
timeout: 10s
retries: 3
db:
restart: always
image: postgres
container_name: mlflow_db
expose:
- "5432"
networks:
- backend
environment:
- POSTGRES_USER=mlflow
- POSTGRES_PASSWORD=mlflow
- POSTGRES_DATABASE=mlflow
volumes:
- ./db_data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD", "pg_isready", "-p", "5432", "-U", "mlflow"]
interval: 5s
timeout: 5s
retries: 3
s3:
restart: always
image: minio/minio
entrypoint: sh
command: -c "mkdir -p /data/mlflow && /opt/bin/minio server /data"
container_name: mlflow_minio
volumes:
- ./minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
networks:
- frontend
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
db_data:
minio_data:
networks:
frontend:
driver: bridge
backend:
driver: bridge