@@ -30,9 +30,10 @@ x-airflow-common:
30
30
environment :
31
31
&airflow-common-env
32
32
AIRFLOW__CORE__EXECUTOR : CeleryExecutor
33
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN : postgresql+psycopg2://airflow:airflow@postgres/airflow
33
+ AIRFLOW__DATABASE__SQL_ALCHEMY_CONN : postgresql+psycopg2://airflow:airflow@postgres:5432 /airflow
34
34
# For backward compatibility, with Airflow <2.3
35
- AIRFLOW__CORE__SQL_ALCHEMY_CONN : postgresql+psycopg2://airflow:airflow@postgres/airflow
35
+ # postgresql+psycopg2://airflow:airflow@postgres/airflow
36
+ AIRFLOW__CORE__SQL_ALCHEMY_CONN : postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
36
37
AIRFLOW__CELERY__RESULT_BACKEND : db+postgresql://airflow:airflow@postgres/airflow
37
38
AIRFLOW__CELERY__BROKER_URL : redis://:@redis:6379/0
38
39
AIRFLOW__CORE__FERNET_KEY : ' '
@@ -65,9 +66,10 @@ services:
65
66
volumes :
66
67
- postgres-db-volume:/var/lib/postgresql/data
67
68
healthcheck :
68
- test : ["CMD", "pg_isready", "-U", "airflow"]
69
- interval : 5s
70
- retries : 5
69
+ test : ["CMD-SHELL", "pg_isready -U airflow -h localhost"]
70
+ interval : 10s
71
+ timeout : 5s
72
+ retries : 15
71
73
restart : always
72
74
73
75
redis :
@@ -76,9 +78,10 @@ services:
76
78
- 6379
77
79
healthcheck :
78
80
test : ["CMD", "redis-cli", "ping"]
79
- interval : 5s
81
+ interval : 10s
80
82
timeout : 30s
81
83
retries : 50
84
+ start_period : 30s
82
85
restart : always
83
86
84
87
@@ -150,6 +153,7 @@ services:
150
153
interval : 10s
151
154
timeout : 10s
152
155
retries : 5
156
+ start_period : 30s
153
157
environment :
154
158
<< : *airflow-common-env
155
159
# Required to handle warm shutdown of the celery workers properly
@@ -159,16 +163,17 @@ services:
159
163
depends_on :
160
164
<< : *airflow-common-depends-on
161
165
airflow-init :
162
- condition : service_completed_successfully
166
+ condition : service_completed_successfully
163
167
164
168
airflow-triggerer :
165
169
<< : *airflow-common
166
170
command : triggerer
167
171
healthcheck :
168
172
test : ["CMD-SHELL", 'airflow jobs check --job-type TriggererJob --hostname "$${HOSTNAME}"']
169
- interval : 10s
173
+ interval : 30s
170
174
timeout : 10s
171
175
retries : 5
176
+ start_period : 30s
172
177
restart : always
173
178
depends_on :
174
179
<< : *airflow-common-depends-on
@@ -281,6 +286,7 @@ services:
281
286
interval : 10s
282
287
timeout : 10s
283
288
retries : 5
289
+ start_period : 30s
284
290
restart : always
285
291
depends_on :
286
292
<< : *airflow-common-depends-on
0 commit comments