-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
79 lines (72 loc) · 2.23 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
79 lines (72 loc) · 2.23 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
78
79
#Docker Compose for Airflow Dev Testing.
---
version: '3'
x-airflow-common:
&airflow-common
image: apache/airflow:2.0.2
environment:
&airflow-common-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow
AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
AIRFLOW__CORE__FERNET_KEY: ''
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
AIRFLOW__WEBSERVER__WORKERS: 1
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
AIRFLOW__CORE__DEFAULT_TIMEZONE: 'Asia/Kolkata'
AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE: 'Asia/Kolkata'
AIRFLOW__API__AUTH_BACKEND: 'airflow.api.auth.backend.basic_auth'
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'
AIRFLOW__WEBSERVER__EXPOSE_HOSTNAME: 'true'
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- ./db:/var/lib/postgresql/data
restart: always
redis:
image: redis:latest
ports:
- 6379:6379
restart: always
airflow-webserver:
<<: *airflow-common
command: webserver
ports:
- 8080:8080
restart: always
depends_on:
airflow-init:
condition: service_completed_successfully
airflow-scheduler:
<<: *airflow-common
command: scheduler
restart: always
depends_on:
airflow-init:
condition: service_completed_successfully
airflow-worker:
<<: *airflow-common
command: celery worker
restart: always
depends_on:
airflow-init:
condition: service_completed_successfully
airflow-init:
<<: *airflow-common
command: version
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: airflow-user
_AIRFLOW_WWW_USER_PASSWORD: airflow-pass