You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To configure database resource, `init` secrets in [`./src/Dotnet6.GraphQL4.Store.WebAPI`](./src/Dotnet6.GraphQL4.Store.WebAPI), and then define the `DefaultConnection`:
25
+
### Development (secrets)
26
+
27
+
To configure database resource, `init` secrets in [`./src/Dotnet6.GraphQL4.Store.WebAPI`](./src/Dotnet6.GraphQL4.Store.WebAPI), and then define the `DefaultConnection`:
If you prefer, is possible to define it on WebAPI [`appsettings.Development.json`](./src/Dotnet6.GraphQL4.Store.WebAPI/appsettings.Development.json) and WebMVC [`appsettings.Development.json`](./src/Dotnet6.GraphQL4.Store.WebMVC/appsettings.Development.json) files:
45
44
@@ -62,13 +61,12 @@ WebMCV
62
61
}
63
62
}
64
63
```
65
-
___
66
64
67
65
### Production
68
66
69
-
Considering use Docker for CD (Continuous Deployment). On respective [compose](./docker-compose.yml) both web applications and sql server are in the same network, and then we can use named hosts. Already defined on WebAPI [`appsettings.json`](./src/Dotnet6.GraphQL4.Store.WebAPI/appsettings.json) and WebMVC [`appsettings.json`](./src/Dotnet6.GraphQL4.Store.WebMVC/appsettings.json) files:
67
+
Considering use Docker for CD (Continuous Deployment). On respective [compose](./docker-compose.yml) both web applications and sql server are in the same network, and then we can use named hosts. Already defined on WebAPI [`appsettings.json`](./src/Dotnet6.GraphQL4.Store.WebAPI/appsettings.json) and WebMVC [`appsettings.json`](./src/Dotnet6.GraphQL4.Store.WebMVC/appsettings.json) files:
70
68
71
-
#####AppSettings
69
+
#### AppSettings
72
70
73
71
WebAPI
74
72
@@ -89,6 +87,152 @@ WebMCV
89
87
}
90
88
}
91
89
```
90
+
91
+
### Docker
92
+
93
+
The [`./docker-compose.yml`](./docker-compose.yml) provide the `WebAPI`, `WebMVC` and `MS SQL Server` applications:
94
+
95
+
```bash
96
+
docker-compose up -d
97
+
```
98
+
99
+
It's possible to run without a clone of the project using the respective compose:
By default **Playground** respond at `http://localhost:5000/ui/playground` but is possible configure the host and many others details in [`../...WebAPI/GraphQL/DependencyInjection/Configure.cs`](./src/Dotnet6.GraphQL4.Store.WebAPI/GraphQL/DependencyInjection/Configure.cs)
175
+
176
+
```c#
177
+
app.UseGraphQLPlayground(
178
+
new GraphQLPlaygroundOptions
179
+
{
180
+
Path = "/ui/playground",
181
+
BetaUpdates = true,
182
+
RequestCredentials = RequestCredentials.Omit,
183
+
HideTracingResponse = false,
184
+
EditorCursorShape = EditorCursorShape.Line,
185
+
EditorTheme = EditorTheme.Dark,
186
+
EditorFontSize = 14,
187
+
EditorReuseHeaders = true,
188
+
EditorFontFamily = "JetBrains Mono"
189
+
});
190
+
```
191
+
192
+
### Health checks
193
+
194
+
Based on cloud-native concepts, **Readiness** and **Liveness** integrity verification strategies were implemented.
195
+
196
+
> `/health`
197
+
> Just check if the instance is running.
198
+
199
+
> `/health/live`
200
+
> Check if the instance is running and all the dependencies too.
201
+
202
+
> `/health/ready`
203
+
> Check if the instance and all the dependencies are ready to attend to all functionalities.
204
+
205
+
> `/healthz`
206
+
> HealthReport specific for HealthCheck-UI.
207
+
208
+
Web API
209
+
210
+
`http://localhost:5000/health/ready`
211
+
212
+

213
+
214
+
Web MVC
215
+
216
+
`http://localhost:7000/health/ready`
217
+
218
+

219
+
220
+
### Dump configuration
221
+
222
+
It is possible to dump the state of the environment configuration in through the middleware resource `/dump-config` in both applications.
223
+
224
+
```c#
225
+
public void Configure(IApplicationBuilder app)
226
+
{
227
+
app.UseEndpoints(endpoints =>
228
+
{
229
+
endpoints.MapDumpConfig(
230
+
pattern: "/dump-config",
231
+
configInfo: (_configuration as IConfigurationRoot).GetDebugView(),
232
+
isDevelopment: _env.IsDevelopment());
233
+
});
234
+
}
235
+
```
92
236
___
93
237
94
238
## Highlights
@@ -284,112 +428,6 @@ public sealed class KayakGraphType : ObjectGraphType<Kayak>
284
428
285
429
___
286
430
287
-
## Running
288
-
289
-
The [`./docker-compose.yml`](./docker-compose.yml) provide the `WebAPI`, `WebMVC` and `MS SQL Server` applications:
290
-
291
-
```bash
292
-
docker-compose up -d
293
-
```
294
-
295
-
It's possible to run without a clone of the project using the respective compose:
Based on cloud-native concepts, **Readiness** and **Liveness** integrity verification strategies were implemented.
350
-
351
-
> `/health`
352
-
> Just check if the instance is running.
353
-
354
-
> `/health/live`
355
-
> Check if the instance is running and all the dependencies too.
356
-
357
-
> `/health/ready`
358
-
> Check if the instance and all the dependencies are ready to attend to all functionalities.
359
-
360
-
Web API
361
-
362
-
`http://localhost:5000/health/ready`
363
-
364
-

365
-
366
-
Web MVC
367
-
368
-
`http://localhost:7000/health/ready`
369
-
370
-

371
-
372
-
---
373
-
374
-
### GraphQL Playground
375
-
376
-
By default **Playground** respond at `http://localhost:5000/ui/playground` but is possible configure the host and many others details in [`../...WebAPI/GraphQL/DependencyInjection/Configure.cs`](./src/Dotnet6.GraphQL4.Store.WebAPI/GraphQL/DependencyInjection/Configure.cs)
0 commit comments