-
Notifications
You must be signed in to change notification settings - Fork 6
/
airflow.yml
92 lines (92 loc) · 2.99 KB
/
airflow.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
version: '3.8'
services:
airflow-metadata:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- airflow-db-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "airflow" ]
interval: 5s
retries: 5
restart: always
airflow-scheduler:
image: my-custom-airflow:${AIRFLOW_VERSION:-2.4.1}
build:
context: ../docker
dockerfile: Dockerfile
args:
AIRFLOW_VERSION: ${AIRFLOW_VERSION:-2.4.1}
command: scheduler
healthcheck:
test: [ "CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"' ]
interval: 10s
timeout: 10s
retries: 5
restart: always
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
airflow-metadata:
condition: service_healthy
airflow-init:
condition: service_completed_successfully
env_file:
- airflow/airflow.env
volumes:
- ../dags:/opt/airflow/dags
- ../logs:/opt/airflow/logs
airflow-webserver:
image: my-custom-airflow:${AIRFLOW_VERSION:-2.4.1}
build:
context: ../docker
dockerfile: Dockerfile
args:
AIRFLOW_VERSION: ${AIRFLOW_VERSION:-2.4.1}
command: webserver
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:8080/health" ]
interval: 10s
timeout: 10s
retries: 5
restart: always
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
airflow-metadata:
condition: service_healthy
airflow-init:
condition: service_completed_successfully
env_file:
- airflow/airflow.env
volumes:
- ../dags:/opt/airflow/dags
- ../logs:/opt/airflow/logs
ports:
- "8080:8080"
airflow-init:
image: my-custom-airflow:${AIRFLOW_VERSION:-2.4.1}
build:
context: ../docker
dockerfile: Dockerfile
args:
AIRFLOW_VERSION: ${AIRFLOW_VERSION:-2.4.1}
entrypoint: /opt/airflow/scripts/entrypoint.sh
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
airflow-metadata:
condition: service_healthy
env_file:
- airflow/airflow.env
environment:
_AIRFLOW_WWW_USER_USERNAME: airflow_user
_AIRFLOW_WWW_USER_FIRSTNAME: Airflow
_AIRFLOW_WWW_USER_LASTNAME: Admin
_AIRFLOW_WWW_USER_EMAIL: [email protected]
_AIRFLOW_WWW_USER_ROLE: Admin
_AIRFLOW_WWW_USER_PASSWORD: airflow_password
volumes:
- ./airflow/scripts:/opt/airflow/scripts
volumes:
airflow-db-data: {}