@@ -13,7 +13,8 @@ services:
13
13
dockerfile : " Dockerfile.nginx-${DEFECT_DOJO_OS:-debian}"
14
14
image : " defectdojo/defectdojo-nginx:${NGINX_VERSION:-latest}"
15
15
depends_on :
16
- - uwsgi
16
+ uwsgi :
17
+ condition : service_started
17
18
environment :
18
19
NGINX_METRICS_ENABLED : " ${NGINX_METRICS_ENABLED:-false}"
19
20
DD_UWSGI_HOST : " ${DD_UWSGI_HOST:-uwsgi}"
@@ -36,7 +37,12 @@ services:
36
37
target : django
37
38
image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
38
39
depends_on :
39
- - postgres
40
+ initializer :
41
+ condition : service_completed_successfully
42
+ postgres :
43
+ condition : service_started
44
+ redis :
45
+ condition : service_started
40
46
entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-uwsgi.sh']
41
47
environment :
42
48
DD_DEBUG : ' False'
@@ -55,8 +61,12 @@ services:
55
61
celerybeat :
56
62
image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
57
63
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
60
70
entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-beat.sh']
61
71
environment :
62
72
DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
@@ -71,8 +81,12 @@ services:
71
81
celeryworker :
72
82
image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
73
83
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
76
90
entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-worker.sh']
77
91
environment :
78
92
DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
@@ -88,7 +102,8 @@ services:
88
102
initializer :
89
103
image : " defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}"
90
104
depends_on :
91
- - postgres
105
+ postgres :
106
+ condition : service_started
92
107
entrypoint : ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '--', '/entrypoint-initializer.sh']
93
108
environment :
94
109
DD_DATABASE_URL : ${DD_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/defectdojo}
0 commit comments