-
Notifications
You must be signed in to change notification settings - Fork 0
/
airflow.yaml
210 lines (201 loc) · 7.48 KB
/
airflow.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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
version: '3.5'
services:
redis:
image: 'redis:3.2.7'
networks:
- airflow_network
restart: always
postgres:
image: postgres:9.6
networks:
- airflow_network
restart: always
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./pgdata:/var/lib/postgresql/data/pgdata
ports:
- "5433:5432"
webserver:
image: teaching_airflow:main
networks:
- airflow_network
restart: always
depends_on:
- postgres
- redis
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- AIRFLOW__WEBSERVER__WORKERS=2
- AIRFLOW__CELERY__WORKER_CONCURRENCY=8
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- AIRFLOW__CORE__DAG_CONCURRENCY=16
- AIRFLOW__CORE__PARALLELISM=32
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_RECYCLE=3600
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_SIZE=100
- AIRFLOW__WEBSERVER__DAG_DEFAULT_VIEW=graph
- AIRFLOW__CELERY__DEFAULT_QUEUE=default
- AIRFLOW__CELERY__CELERY_APP_NAME=airflow.executors.celery_executor
- AIRFLOW__CELERY__CELERY_CONFIG_OPTIONS=airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__DAGS_FOLDER=/usr/local/airflow/dags
- AIRFLOW__CORE__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__CELERY_RESULT_BACKEND=rdb+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
volumes:
- ./dags:/usr/local/airflow/dags
- ./plugins:/usr/local/airflow/plugins
- ./sql:/usr/local/airflow/sql
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
flower:
image: teaching_airflow:main
networks:
- airflow_network
restart: always
depends_on:
- redis
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- AIRFLOW__WEBSERVER__WORKERS=2
- AIRFLOW__CELERY__WORKER_CONCURRENCY=8
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- AIRFLOW__CORE__DAG_CONCURRENCY=16
- AIRFLOW__CORE__PARALLELISM=32
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_RECYCLE=3600
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_SIZE=100
- AIRFLOW__WEBSERVER__DAG_DEFAULT_VIEW=graph
- AIRFLOW__CELERY__DEFAULT_QUEUE=default
- AIRFLOW__CELERY__CELERY_APP_NAME=airflow.executors.celery_executor
- AIRFLOW__CELERY__CELERY_CONFIG_OPTIONS=airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__DAGS_FOLDER=/usr/local/airflow/dags
- AIRFLOW__CORE__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__CELERY_RESULT_BACKEND=rdb+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
ports:
- "5555:5555"
command: flower
scheduler:
image: teaching_airflow:main
networks:
- airflow_network
restart: always
depends_on:
- webserver
volumes:
- ./dags:/usr/local/airflow/dags
- ./plugins:/usr/local/airflow/plugins
- ./sql:/usr/local/airflow/sql
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- AIRFLOW__WEBSERVER__WORKERS=2
- AIRFLOW__CELERY__WORKER_CONCURRENCY=8
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- AIRFLOW__CORE__DAG_CONCURRENCY=16
- AIRFLOW__CORE__PARALLELISM=32
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_RECYCLE=3600
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_SIZE=100
- AIRFLOW__WEBSERVER__DAG_DEFAULT_VIEW=graph
- AIRFLOW__CELERY__DEFAULT_QUEUE=default
- AIRFLOW__CELERY__CELERY_APP_NAME=airflow.executors.celery_executor
- AIRFLOW__CELERY__CELERY_CONFIG_OPTIONS=airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__DAGS_FOLDER=/usr/local/airflow/dags
- AIRFLOW__CORE__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__CELERY_RESULT_BACKEND=rdb+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
command: scheduler
worker:
image: teaching_airflow:main
networks:
- airflow_network
restart: always
depends_on:
- scheduler
volumes:
- ./dags:/usr/local/airflow/dags
- ./plugins:/usr/local/airflow/plugins
- ./sql:/usr/local/airflow/sql
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- AIRFLOW__WEBSERVER__WORKERS=2
- AIRFLOW__CELERY__WORKER_CONCURRENCY=8
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- AIRFLOW__CORE__DAG_CONCURRENCY=16
- AIRFLOW__CORE__PARALLELISM=32
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_RECYCLE=3600
- AIRFLOW__CORE__SQL_ALCHEMY_POOL_SIZE=100
- AIRFLOW__WEBSERVER__DAG_DEFAULT_VIEW=graph
- AIRFLOW__CELERY__DEFAULT_QUEUE=default
- AIRFLOW__CELERY__CELERY_APP_NAME=airflow.executors.celery_executor
- AIRFLOW__CELERY__CELERY_CONFIG_OPTIONS=airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__DAGS_FOLDER=/usr/local/airflow/dags
- AIRFLOW__CORE__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__CELERY_RESULT_BACKEND=rdb+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
command: worker -q default,secret
mysql:
image: mysql:8.0.20
networks:
- airflow_network
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_ROOT_PASSWORD=airflow
- MYSQL_DATABASE=public
- MYSQL_USER=airflow
- MYSQL_PASSWORD=airflow
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- "3307:3306"
ftp:
image: stilliard/pure-ftpd
networks:
- airflow_network
ports:
- "21:21"
- "30000-30009:30000-30009"
volumes:
- "./ftp/data/:/home/airflow/"
- "./ftp/passwd:/etc/pure-ftpd/passwd"
environment:
PUBLICHOST: "0.0.0.0"
FTP_USER_NAME: airflow
FTP_USER_PASS: airflow
FTP_USER_HOME: /home/airflow
restart: always
networks:
airflow_network:
name: airflow_network