File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -305,18 +305,25 @@ services:
305
305
environment:
306
306
SA_PASSWORD: "!MyComplexPassword"
307
307
ACCEPT_EULA: "Y"
308
+ healthcheck:
309
+ test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
310
+ interval: 10s
311
+ timeout: 3s
312
+ retries: 10
313
+ start_period: 10s
308
314
networks:
309
315
- graphqlstore
310
316
311
317
webapi:
312
318
container_name: webapi
313
319
image: antoniofalcaojr/dotnet5-graphql3-webapi
314
320
environment:
315
- - ASPNETCORE_URLS= http : // *:5000
321
+ - ASPNETCORE_URLS= http : // *:5000
316
322
ports :
317
323
- 5000 : 5000
318
324
depends_on :
319
- - mssql
325
+ mssql :
326
+ condition : service_healthy
320
327
networks :
321
328
- graphqlstore
322
329
@@ -328,7 +335,7 @@ services:
328
335
ports :
329
336
- 7000 : 7000
330
337
depends_on :
331
- - webapi
338
+ - webapi
332
339
networks :
333
340
- graphqlstore
334
341
You can’t perform that action at this time.
0 commit comments