-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
132 lines (121 loc) · 2.76 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
132
#This Compose file is used for development purposes only. This can be edited on a local machine to test Airflow.
version: '3.7'
networks:
airflow:
name: airflow
attachable: true
volumes:
pgdata: {}
logs: {}
x-database-env:
&database-env
POSTGRES_USER: airflow
POSTGRES_DB: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
x-airflow-env:
&airflow-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
AIRFLOW__WEBSERVER__RBAC: 'True'
AIRFLOW__CORE__CHECK_SLAS: 'False'
AIRFLOW__CORE__STORE_SERIALIZED_DAGS: 'True'
AIRFLOW__CORE__STORE_DAG_CODE: 'True'
AIRFLOW__CORE__PARALLELISM: 25
AIRFLOW__CORE__LOAD_EXAMPLES: 'False'
AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS: 'False'
AIRFLOW__SCHEDULER__SCHEDULER_HEARTBEAT_SEC: 10
ADMIN_USER: airflow
ADMIN_PASSWORD: airflow
services:
postgres:
image: postgres:12.2
environment:
<<: *database-env
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
command: >
postgres
-c listen_addresses=*
-c logging_collector=on
-c log_destination=stderr
-c max_connections=50
networks:
- airflow
redis:
image: redis:5.0.9
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
ports:
- 6379:6379
networks:
- airflow
webserver:
image: airflow:development
ports:
- 8080:8080
volumes:
- ./dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- logs:/opt/airflow/logs
environment:
<<: *database-env
<<: *airflow-env
depends_on:
- postgres
- redis
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /opt/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
networks:
- airflow
flower:
image: airflow:development
ports:
- 5555:5555
environment:
<<: *database-env
volumes:
- ./dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- logs:/opt/airflow/logs
command: flower
depends_on:
- redis
networks:
- airflow
scheduler:
image: airflow:development
volumes:
- ./dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- logs:/opt/airflow/logs
environment:
<<: *database-env
<<: *airflow-env
command: scheduler
depends_on:
- postgres
networks:
- airflow
worker:
image: airflow:development
volumes:
- ./dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- logs:/opt/airflow/logs
environment:
<<: *database-env
<<: *airflow-env
command: worker
depends_on:
- scheduler
networks:
- airflow