-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
94 lines (87 loc) · 2.23 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
version: "3.9"
services:
db:
container_name: db
image: mysql/mysql-server:5.7.28
restart: unless-stopped
expose:
- "3306"
volumes:
- db_volume:/var/lib/mysql
- ./db/init:/docker-entrypoint-initdb.d
networks:
- internal
command: --explicit_defaults_for_timestamp=1
mlflow:
container_name: tracker_mlflow
image: tracker_ml
restart: unless-stopped
build:
context: ./mlflow
dockerfile: Dockerfile
ports:
- "5000:5000"
networks:
- public
- internal
entrypoint: mlflow server --backend-store-uri mysql+pymysql://mlflow_user:mlflow_password@db:3306/mlflow --default-artifact-root gs://${ARTIFACT_BUCKET}/ --artifacts-destination gs://${ARTIFACT_BUCKET}/ -h 0.0.0.0
depends_on:
wait-for-db:
condition: service_completed_successfully
airflow:
container_name: airflow
restart: unless-stopped
build:
context: ./airflow
dockerfile: Dockerfile
volumes:
- ./src/dags:/opt/airflow/dags
ports:
- 8080:8080
healthcheck:
test: [ "CMD", "nc", "-z", "airflow", "8080" ]
timeout: 45s
interval: 10s
retries: 10
entrypoint: ./start-airflow.sh
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/credentials/${SERVICE_ACCOUNT}
networks:
- public
- internal
depends_on:
wait-for-db:
condition: service_completed_successfully
dev:
container_name: development_env
image: development_env
restart: unless-stopped
build:
context: ./src
dockerfile: Dockerfile
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/app/credentials/${SERVICE_ACCOUNT}
ports:
- "8888:8888" # Access jupyter
- "8501:8501" # Access streamlit
networks:
- public
- internal
entrypoint: bash -c "streamlit run streamlit/ui.py & jupyter notebook --ip 0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''"
volumes:
- ./src/:/app
depends_on:
- mlflow
wait-for-db:
image: atkrad/wait4x
depends_on:
- db
command: tcp db:3306 -t 90s -i 250ms
networks:
- internal
networks:
internal:
public:
driver: bridge
volumes:
db_volume: