@@ -8,6 +8,8 @@ x-docker-common: &docker-common
8
8
- ./sqlite:/opt/airflow/sqlite
9
9
# you can comment out the following line if you don't have service-account.json
10
10
- ./service-account.json:/opt/airflow/service-account.json
11
+ environment :
12
+ AIRFLOW__CORE__EXECUTION_API_SERVER_URL : ' http://airflow-api-server:8080/execution/'
11
13
logging :
12
14
driver : json-file
13
15
options :
@@ -21,7 +23,7 @@ services:
21
23
- " 8080:8080"
22
24
command : api-server
23
25
healthcheck :
24
- test : ["CMD", "curl", "--fail", "http://localhost:8080/health "]
26
+ test : ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version "]
25
27
interval : 30s
26
28
timeout : 10s
27
29
retries : 5
@@ -35,6 +37,12 @@ services:
35
37
<< : *docker-common
36
38
container_name : airflow-dag-processor
37
39
command : dag-processor
40
+ healthcheck :
41
+ test : ["CMD-SHELL", 'airflow jobs check --job-type DagProcessorJob --hostname "$${HOSTNAME}"']
42
+ interval : 30s
43
+ timeout : 10s
44
+ retries : 5
45
+ start_period : 30s
38
46
restart : always
39
47
depends_on :
40
48
airflow-init :
@@ -44,6 +52,12 @@ services:
44
52
<< : *docker-common
45
53
container_name : airflow-scheduler
46
54
command : scheduler
55
+ healthcheck :
56
+ test : ["CMD", "curl", "--fail", "http://localhost:8974/health"]
57
+ interval : 30s
58
+ timeout : 10s
59
+ retries : 5
60
+ start_period : 30s
47
61
restart : always
48
62
depends_on :
49
63
airflow-init :
@@ -58,7 +72,6 @@ services:
58
72
if [[ -n "$${_AIRFLOW_DB_MIGRATE=}" ]]; then
59
73
airflow db migrate || true
60
74
fi
61
- exit 0
62
75
restart : " no"
63
76
environment :
64
77
_AIRFLOW_DB_MIGRATE : ' false'
0 commit comments