-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
77 lines (72 loc) · 2.32 KB
/
docker-compose.yaml
File metadata and controls
77 lines (72 loc) · 2.32 KB
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
version: '3.8'
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
airflow-webserver:
build: .
depends_on:
- postgres
- mlflow-server
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE: UTC
AIRFLOW__CORE__LOAD_EXAMPLES: 'False'
PYTHONPATH: /opt/airflow:/opt/airflow/github_pipeline:/opt/airflow/alerts
env_file:
- .env
volumes:
- ./dags:/opt/airflow/dags
- ./github_pipeline:/opt/airflow/github_pipeline
- ./alerts:/opt/airflow/alerts
- ./reports:/opt/airflow/reports
- ./data:/opt/airflow/data
- ./models:/opt/airflow/models
- ./logs:/opt/airflow/logs
- ./mlruns:/mlruns
ports:
- "8080:8080"
command: >
bash -c "
airflow db migrate &&
airflow users create --username admin --password admin --firstname Admin --lastname User --role Admin --email admin@example.com &&
airflow webserver"
airflow-scheduler:
build: .
depends_on:
- postgres
- mlflow-server
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
PYTHONPATH: /opt/airflow:/opt/airflow/github_pipeline:/opt/airflow/alerts
env_file:
- .env
volumes:
- ./dags:/opt/airflow/dags
- ./github_pipeline:/opt/airflow/github_pipeline
- ./alerts:/opt/airflow/alerts
- ./reports:/opt/airflow/reports
- ./data:/opt/airflow/data
- ./models:/opt/airflow/models
- ./logs:/opt/airflow/logs
- ./mlruns:/mlruns
command: airflow scheduler
mlflow-server:
image: ghcr.io/mlflow/mlflow:latest
environment:
- MLFLOW_BACKEND_STORE_URI=sqlite:///mlflow/mlflow.db
- MLFLOW_DEFAULT_ARTIFACT_ROOT=/mlruns/artifacts
volumes:
- ./mlruns:/mlruns
ports:
- "5000:5000"
command: mlflow server --backend-store-uri sqlite:///mlruns/mlflow.db --default-artifact-root /mlruns/artifacts --host 0.0.0.0 --port 5000
volumes:
postgres-db-volume: