-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
93 lines (86 loc) · 2.21 KB
/
docker-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
version: '3.9'
services:
mlflow:
build:
context: .
dockerfile: Dockerfile.mlflow
environment:
- MLFLOW_BACKEND_STORE_URI=${MLFLOW_BACKEND_STORE_URI}
- MLFLOW_DEFAULT_ARTIFACT_ROOT=${MLFLOW_DEFAULT_ARTIFACT_ROOT}
- MLFLOW_TRACKING_URI=http://127.0.0.1:5000
ports:
- "5000:5000"
volumes:
- ./mlruns:/mlflow/mlruns
networks:
- back-tier
app:
build:
context: .
dockerfile: Dockerfile
image: $TF_VAR_ecr_repository_name:latest
command: >
/bin/bash -c "
echo 'Running start.sh' &&
/app/start.sh &&
sleep 10 &&
echo 'Logging in to Prefect Cloud' &&
prefect cloud login --key $PREFECT_API_KEY --workspace $PREFECT_WORKSPACE &&
echo 'Running Python flow script' &&
python run_flow.py"
environment:
- PREFECT_API_KEY=${PREFECT_API_KEY}
- PREFECT_WORKSPACE=${PREFECT_WORKSPACE}
- MLFLOW_TRACKING_URI=http://mlflow:5000
- AWS_REGION=${AWS_REGION}
- AWS_ACCOUNT_ID=${AWS_ACCOUNT_ID}
- TF_VAR_ecr_repository_name=${TF_VAR_ecr_repository_name}
- TF_VAR_aws_region=${TF_VAR_aws_region}
depends_on:
- mlflow
- db
ports:
- "8080:8080"
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
networks:
- back-tier
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: example
ports:
- "5432:5432"
networks:
- back-tier
adminer:
image: adminer
restart: always
ports:
- "8081:8080" # Changed to avoid port conflict with app service
networks:
- back-tier
- front-tier
grafana:
image: grafana/grafana
user: "472"
environment:
GF_DATABASE_USER: postgres
GF_DATABASE_PASSWORD: example
GF_DATABASE_NAME: test
ports:
- "3000:3000"
volumes:
- ./config/grafana_datasources.yaml:/etc/grafana/provisioning/datasources/datasource.yaml:ro
- ./config/grafana_dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro
- ./dashboards:/opt/grafana/dashboards
networks:
- back-tier
- front-tier
networks:
front-tier:
back-tier:
volumes:
grafana_data: {}