Skip to content

Commit fd4077c

Browse files
Merge pull request #114 from AntonioFalcao/release
Updating
2 parents 409f7a8 + 83d1164 commit fd4077c

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,18 +305,25 @@ services:
305305
environment:
306306
SA_PASSWORD: "!MyComplexPassword"
307307
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
308314
networks:
309315
- graphqlstore
310316

311317
webapi:
312318
container_name: webapi
313319
image: antoniofalcaojr/dotnet5-graphql3-webapi
314320
environment:
315-
- ASPNETCORE_URLS=http://*:5000
321+
- ASPNETCORE_URLS=http://*:5000
316322
ports:
317323
- 5000:5000
318324
depends_on:
319-
- mssql
325+
mssql:
326+
condition: service_healthy
320327
networks:
321328
- graphqlstore
322329

@@ -328,7 +335,7 @@ services:
328335
ports:
329336
- 7000:7000
330337
depends_on:
331-
- webapi
338+
- webapi
332339
networks:
333340
- graphqlstore
334341

docker-compose.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
version: "3.7"
22

33
services:
4-
54
mssql:
65
container_name: mssql
76
image: mcr.microsoft.com/mssql/server
@@ -10,6 +9,12 @@ services:
109
environment:
1110
SA_PASSWORD: "!MyComplexPassword"
1211
ACCEPT_EULA: "Y"
12+
healthcheck:
13+
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
14+
interval: 10s
15+
timeout: 3s
16+
retries: 10
17+
start_period: 10s
1318
networks:
1419
- graphqlstore
1520

@@ -23,10 +28,11 @@ services:
2328
- ASPNETCORE_URLS=http://*:5000
2429
ports:
2530
- 5000:5000
31+
depends_on:
32+
mssql:
33+
condition: service_healthy
2634
networks:
2735
- graphqlstore
28-
depends_on:
29-
- mssql
3036

3137
webmvc:
3238
container_name: webmvc
@@ -38,10 +44,10 @@ services:
3844
- ASPNETCORE_URLS=http://*:7000
3945
ports:
4046
- 7000:7000
41-
networks:
42-
- graphqlstore
4347
depends_on:
4448
- webapi
49+
networks:
50+
- graphqlstore
4551

4652
networks:
4753
graphqlstore:

0 commit comments

Comments
 (0)