forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose-CeleryExecutor.yml
111 lines (105 loc) · 4.39 KB
/
docker-compose-CeleryExecutor.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
version: '2.1'
services:
redis:
image: 'redis:5.0.5'
# command: redis-server --requirepass redispass
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
# Uncomment these lines to persist data on the local filesystem.
# - PGDATA=/var/lib/postgresql/data/pgdata
# volumes:
# - ./pgdata:/var/lib/postgresql/data/pgdata
webserver:
image: zdp-airflow:zmaster
depends_on:
- postgres
- redis
- initdb
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
- AIRFLOW__CORE__FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- AIRFLOW__CORE__LOAD_EXAMPLES=False
volumes:
- ./dags:/home/airflow/airflow/dags
# Uncomment to include custom plugins
ports:
- "8080:8080"
command: webserver -w 16
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
initdb:
image: zdp-airflow:zmaster
depends_on:
- postgres
- redis
volumes:
- ./dags:/home/airflow/airflow/dags
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
- AIRFLOW__CORE__FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- AIRFLOW__CORE__LOAD_EXAMPLES=False
command: initdb
flower:
image: zdp-airflow:zmaster
restart: always
depends_on:
- redis
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
- AIRFLOW__CORE__FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- AIRFLOW__CORE__LOAD_EXAMPLES=False
ports:
- "5555:5555"
command: flower
scheduler:
image: zdp-airflow:zmaster
restart: always
depends_on:
- webserver
volumes:
- ./dags:/home/airflow/airflow/dags
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
- AIRFLOW__CORE__FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- AIRFLOW__CORE__LOAD_EXAMPLES=False
command: scheduler -r 30
worker:
image: zdp-airflow:zmaster
restart: always
depends_on:
- scheduler
volumes:
- ./dags:/home/airflow/airflow/dags
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres:5432/airflow
- AIRFLOW__CELERY__BROKER_URL=redis://redis:6379/1
- AIRFLOW__CORE__EXECUTOR=CeleryExecutor
- AIRFLOW__CORE__FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- AIRFLOW__CORE__LOAD_EXAMPLES=False
command: worker