@@ -13,7 +13,8 @@ services:
1313 dockerfile : " Dockerfile.nginx-${DEFECT_DOJO_OS:-debian}"
1414 image : " defectdojo/defectdojo-nginx:${NGINX_VERSION:-latest}"
1515 depends_on :
16- - uwsgi
16+ uwsgi :
17+ condition : service_started
1718 environment :
1819 NGINX_METRICS_ENABLED : " ${NGINX_METRICS_ENABLED:-false}"
1920 DD_UWSGI_HOST : " ${DD_UWSGI_HOST:-uwsgi}"
@@ -36,7 +37,12 @@ services:
3637 target : django
3738 image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
3839 depends_on :
39- - postgres
40+ initializer :
41+ condition : service_completed_successfully
42+ postgres :
43+ condition : service_started
44+ redis :
45+ condition : service_started
4046 entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-uwsgi.sh']
4147 environment :
4248 DD_DEBUG : ' False'
@@ -55,8 +61,12 @@ services:
5561 celerybeat :
5662 image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
5763 depends_on :
58- - postgres
59- - redis
64+ initializer :
65+ condition : service_completed_successfully
66+ postgres :
67+ condition : service_started
68+ redis :
69+ condition : service_started
6070 entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-beat.sh']
6171 environment :
6272 DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
@@ -71,8 +81,12 @@ services:
7181 celeryworker :
7282 image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
7383 depends_on :
74- - postgres
75- - redis
84+ initializer :
85+ condition : service_completed_successfully
86+ postgres :
87+ condition : service_started
88+ redis :
89+ condition : service_started
7690 entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-worker.sh']
7791 environment :
7892 DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
@@ -88,7 +102,8 @@ services:
88102 initializer :
89103 image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
90104 depends_on :
91- - postgres
105+ postgres :
106+ condition : service_started
92107 entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '--', '/entrypoint-initializer.sh']
93108 environment :
94109 DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
0 commit comments