@@ -65,6 +65,10 @@ services:
6565 - " MYSQL_ROOT_PASSWORD=root"
6666 - " MYSQL_DATABASE=db"
6767 restart : " always"
68+ healthcheck :
69+ test : ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
70+ timeout : 5s
71+ retries : 10
6872 networks :
6973 - default
7074 volumes :
@@ -83,6 +87,10 @@ services:
8387 - " MYSQL_ROOT_PASSWORD=root"
8488 - " MYSQL_DATABASE=db"
8589 restart : " always"
90+ healthcheck :
91+ test : ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
92+ timeout : 5s
93+ retries : 10
8694 networks :
8795 - default
8896 volumes :
@@ -131,8 +139,13 @@ services:
131139 ports :
132140 - " 8081:8080"
133141 restart : " always"
142+ healthcheck :
143+ test : ["CMD", "ping", "localhost"]
144+ timeout : 5s
145+ retries : 10
134146 depends_on :
135- - " mysql-config-db"
147+ mysql-config-db :
148+ condition : service_healthy
136149 networks :
137150 - default
138151
@@ -153,7 +166,8 @@ services:
153166 - " 8080:8080"
154167 restart : " always"
155168 depends_on :
156- - " mysql-trust-db"
169+ mysql-trust-db :
170+ condition : service_healthy
157171 networks :
158172 - default
159173
@@ -166,7 +180,8 @@ services:
166180 hostname : tutorial
167181 container_name : fiware-tutorial
168182 depends_on :
169- - mongo-db
183+ mongo-db :
184+ condition : service_healthy
170185 networks :
171186 - default
172187 expose :
@@ -192,7 +207,8 @@ services:
192207 hostname : iot-agent
193208 container_name : fiware-iot-agent
194209 depends_on :
195- - mongo-db
210+ mongo-db :
211+ condition : service_healthy
196212 networks :
197213 - default
198214 expose :
@@ -270,7 +286,8 @@ services:
270286 networks :
271287 - default
272288 depends_on :
273- - credentials-config
289+ credentials-config :
290+ condition : service_started
274291 ports :
275292 - 1030:80
276293 environment :
0 commit comments