forked from MechDevelopment/mrbeam-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (78 loc) · 1.89 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
version: '3.8'
services:
database:
container_name: database
image: postgres:latest
restart: unless-stopped
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_PASSWORD: ${PGPASSWORD}
POSTGRES_DB: ${PGDATABASE}
env_file:
- .env
ports:
- "${PGPORT}:5432"
minio:
image: minio/minio:latest
container_name: minio
restart: unless-stopped
command: server --console-address ":9001" /data/
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- minio-storage:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
env_file:
- .env
ports:
- 9000:9000
- 9001:9001
mc:
image: minio/mc:latest
depends_on:
- minio
container_name: mc
env_file:
- .env
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc config host add minio http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc alias set minio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} &&
/usr/bin/mc mb minio/mlflow;
/usr/bin/mc mb minio/mrbeam;
exit 0;
"
mlservice:
container_name: mlservice
build:
context: ./ml-service
dockerfile: ./Dockerfile
command: bash -c "python -m app.app"
env_file:
- .env
ports:
- "8011:8011"
volumes:
- ${PWD}/ml-service/weights:/weights
api:
container_name: api
restart: unless-stopped
build:
context: ./api
dockerfile: ./Dockerfile
command: bash -c "./api"
depends_on:
- database
- minio
- mlservice
env_file:
- .env
ports:
- "8001:8001"
volumes:
minio-storage: