-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
133 lines (106 loc) · 3.05 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
x-airflow-common:
&airflow-common
build : ./
image: ${AIRFLOW_IMAGE_NAME:-extend_airflow:latest}
environment : &airflow-common-env
AIRFLOW__CORE__EXECUTOR : LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN : postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__CELERY__RESULT_BACKEND : db+postgresql://airflow:airflow@postgres/airflow
AIRFLOW__CORE__FERNET_KEY : ""
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION : "false"
AIRFLOW__CORE__LOAD_EXAMPLES : "false"
volumes :
- ./dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- ./logs:/opt/airflow/logs
- ./dump:/opt/airflow/dump
user : "${AIRFLOW_UID:-50000}:0"
depends_on :
postgres:
condition : service_healthy
services:
postgres :
image : postgres:13
environment :
POSTGRES_USER : airflow
POSTGRES_PASSWORD : airflow
POSTGRES_DB : airflow
healthcheck :
test : ["CMD-SHELL", "pg_isready -U airflow"]
interval : 5s
retries : 5
start_period : 10s
volumes:
- postgres-db-volume:/var/lib/postgresql/data
ports:
- "5432:5432"
postgres-etl :
image : postgres:13
environment :
POSTGRES_USER : etl
POSTGRES_PASSWORD : etl
POSTGRES_DB : etl
healthcheck :
test : ["CMD-SHELL", "pg_isready -U etl"]
interval : 5s
retries : 5
start_period : 10s
volumes:
- postgres-etl-db-volume:/var/lib/postgresql/data
ports:
- "5433:5432"
pgadmin :
image : dpage/pgadmin4
environment :
PGADMIN_DEFAULT_EMAIL : abklb27@gmail.com
PGADMIN_DEFAULT_PASSWORD : admin
ports :
- "8081:80"
streamlit :
build : ./streamlit
ports :
- "8501:8501"
volumes :
- ./streamlit:/streamlit
command : ["streamlit", "run", "Dashboard.py"]
airflow-webserver :
<< : *airflow-common
command : webserver
ports :
- "8080:8080"
healthcheck :
test : ["CMD-SHELL", "[ -f /opt/airflow/airflow-webserver.pid ]"]
interval : 30s
timeout : 30s
retries : 3
airflow-worker:
<<: *airflow-common
command: celery worker
healthcheck:
test:
- "CMD-SHELL"
- 'celery --app airflow.providers.celery.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}" || celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"'
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
airflow-scheduler :
<< : *airflow-common
command : scheduler
healthcheck :
test : ["CMD-SHELL", "[ -f /opt/airflow/airflow-scheduler.pid ]"]
interval : 30s
timeout : 30s
retries : 3
airflow-init :
<< : *airflow-common
command : version
environment :
<< : *airflow-common-env
_AIRFLOW_DB_UPGRADE : "true"
_AIRFLOW_WWW_USER_CREATE : "true"
_AIRFLOW_WWW_USER_USERNAME : ${AIRFLOW_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD : ${AIRFLOW_PASSWORD:-airflow}
volumes:
postgres-db-volume:
postgres-etl-db-volume: