forked from sachua/mlflow-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (105 loc) · 3.71 KB
/
docker-compose.yml
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.9"
services:
minio:
image: minio/minio:RELEASE.2023-11-20T22-40-07Z
restart: always
ports:
- ${MINIO_PORT}:${MINIO_PORT}
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- minio_data:/data
command: server /data --console-address ":${MINIO_CONSOLE_PORT}" --address ":${MINIO_PORT}"
networks:
- frontend
- backend
mc:
image: minio/mc:RELEASE.2023-11-20T16-30-59Z
depends_on:
- minio
env_file:
- .env
entrypoint: /bin/sh -c "/tmp/wait-for-it.sh minio:${MINIO_PORT} && /usr/bin/mc alias set minio http://minio:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} && /usr/bin/mc mb minio/mlflow && /usr/bin/mc mb minio/prefect; exit 0;"
volumes:
- ./wait-for-it.sh:/tmp/wait-for-it.sh
networks:
- backend
postgres:
image: postgres:15.2
restart: unless-stopped
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_MULTIPLE_DATABASES: ${MLFLOW_DB},postgres:${PREFECT_DB},postgres:${GRAFANA_DB},postgres
volumes:
- postgres_db:/var/lib/postgresql/data
- ./postgres/multiple-db.sh:/docker-entrypoint-initdb.d/multiple-db.sh
networks:
- backend
mlflow_server:
build: ./mlflow
image: mlflow_server
restart: always
depends_on:
- mc
- postgres
ports:
- ${MLFLOW_PORT}:${MLFLOW_PORT}
environment:
MLFLOW_S3_ENDPOINT_URL: http://minio:${MINIO_PORT}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
command: mlflow server --backend-store-uri postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/${MLFLOW_DB} --default-artifact-root s3://mlflow/ --host 0.0.0.0
networks:
- frontend
- backend
prefect_server:
image: prefecthq/prefect:2.14-python3.10
restart: always
volumes:
- prefect:/root/.prefect
entrypoint: ["/opt/prefect/entrypoint.sh", "prefect", "server", "start"]
environment:
PREFECT_UI_URL: http://127.0.0.1:${PREFECT_PORT}/api
PREFECT_API_URL: http://127.0.0.1:${PREFECT_PORT}/api
PREFECT_SERVER_API_HOST: 0.0.0.0
PREFECT_API_DATABASE_CONNECTION_URL: postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/${PREFECT_DB}
ports:
- ${PREFECT_PORT}:${PREFECT_PORT}
depends_on:
- postgres
networks:
- frontend
- backend
adminer:
image: adminer:4.8.1
restart: always
ports:
- ${ADMINER_PORT}:${ADMINER_PORT}
networks:
- frontend
- backend
grafana:
image: grafana/grafana:10.2.2
restart: always
ports:
- ${GRAFANA_PORT}:3000
volumes:
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
- ./grafana/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro
- ./grafana/dashboards:/opt/grafana/dashboards
networks:
- frontend
- backend
volumes:
minio_data:
postgres_db:
prefect:
grafana_data:
networks:
frontend:
backend: