File tree Expand file tree Collapse file tree 13 files changed +83
-16
lines changed
getting-started/docker-compose
OneGround.ZGW.Documenten.Messaging.Listener
OneGround.ZGW.Notificaties.Messaging.Listener Expand file tree Collapse file tree 13 files changed +83
-16
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ KEYCLOAK_ADMIN_PASSWORD=admin
4040HAPROXY_CONFIG_PATH = ../../localdev/haproxy/haproxy-localstack.cfg
4141ONEGROUND_CERTIFICATES_PATH = ./oneground-certificates
4242
43+ # Notificatie-listener
44+ NRC_LISTENER_PORT = 5098
45+ NRC_LISTENER_HOST = notificatielistener.oneground.local
46+
47+ # Document-listener
48+ DRC_LISTENER_PORT = 5099
49+ DRC_LISTENER_HOST = documentlistener.oneground.local
50+
4351# ZGW ports
4452AC_PORT = 5009
4553AC_HOST = localhost
Original file line number Diff line number Diff line change @@ -149,6 +149,8 @@ To ensure all services can communicate with each other and are accessible in you
149149 127.0.0.1 documenten.oneground.local
150150 127.0.0.1 autorisaties.oneground.local
151151 127.0.0.1 referentielijsten.oneground.local
152+ 127.0.0.1 notificatielistener.oneground.local
153+ 127.0.0.1 documentlistener.oneground.local
152154 127.0.0.1 haproxy.oneground.local
153155 ```
154156
@@ -283,7 +285,7 @@ docker compose down
283285
284286Here is a reference list of all the services and tools running in this Docker setup.
285287
286- # ## ZGW API Services
288+ # ## ZGW API Services/Listeners
287289
288290| Service | Port | Swagger UI | Health Check |
289291| :--- | :--- | :--- | :--- |
@@ -294,6 +296,8 @@ Here is a reference list of all the services and tools running in this Docker se
294296| ** Notificaties API** | 5015 | [https://notificaties.oneground.local/swagger](https://notificaties.oneground.local/swagger) | [https://notificaties.oneground.local/health](https://notificaties.oneground.local/health) |
295297| ** Referentielijsten API** | 5018 | [https://referentielijsten.oneground.local/swagger](https://referentielijsten.oneground.local/swagger) | [https://referentielijsten.oneground.local/health](https://referentielijsten.oneground.local/health) |
296298| ** Zaken API** | 5005 | [https://zaken.oneground.local/swagger](https://zaken.oneground.local/swagger) | [https://zaken.oneground.local/health](https://zaken.oneground.local/health) |
299+ | ** Notificatielistener (message dispatcher)** | 5098 | [https://notificatielistener.oneground.local/health](https://notificatielistener.oneground.local/health) |
300+ | ** Documentlistener (message dispatcher)** | 5099 | [https://documentlistener.oneground.local/health](https://documentlistener.oneground.local/health) |
297301
298302# ## Hosted Tools
299303
Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ KEYCLOAK_ADMIN_PASSWORD=admin
4545HAPROXY_CONFIG_PATH = ./haproxy/haproxy-localstack.cfg
4646ONEGROUND_CERTIFICATES_PATH = ./oneground-certificates
4747
48+ # Notificatie-listener
49+ NRC_LISTENER_PORT = 5098
50+ NRC_LISTENER_HOST = notificatielistener.oneground.local
51+
52+ # Document-listener
53+ DRC_LISTENER_PORT = 5099
54+ DRC_LISTENER_HOST = documentlistener.oneground.local
55+
4856# ZGW ports
4957AC_PORT = 5009
5058AC_HOST = localhost
Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ To ensure all services can communicate with each other and are accessible in you
152152 127.0.0.1 documenten.oneground.local
153153 127.0.0.1 autorisaties.oneground.local
154154 127.0.0.1 referentielijsten.oneground.local
155+ 127.0.0.1 notificatielistener.oneground.local
156+ 127.0.0.1 documentlistener.oneground.local
155157 127.0.0.1 haproxy.oneground.local
156158 ` ` `
157159
@@ -259,7 +261,7 @@ docker compose down
259261
260262Here is a reference list of all the services and tools running in this Docker setup.
261263
262- ### ZGW API Services
264+ ### ZGW API Services/listeners
263265
264266| Service | Port | Swagger UI | Health Check |
265267| :--- | :--- | :--- | :--- |
@@ -270,6 +272,8 @@ Here is a reference list of all the services and tools running in this Docker se
270272| **Notificaties API** | 5015 | [https://notificaties.oneground.local/swagger](https://notificaties.oneground.local/swagger) | [https://notificaties.oneground.local/health](https://notificaties.oneground.local/health) |
271273| **Referentielijsten API** | 5018 | [https://referentielijsten.oneground.local/swagger](https://referentielijsten.oneground.local/swagger) | [https://referentielijsten.oneground.local/health](https://referentielijsten.oneground.local/health) |
272274| **Zaken API** | 5005 | [https://zaken.oneground.local/swagger](https://zaken.oneground.local/swagger) | [https://zaken.oneground.local/health](https://zaken.oneground.local/health) |
275+ | **Notificatielistener (message dispatcher)** | 5098 | [https://notificatielistener.oneground.local/health](https://notificatielistener.oneground.local/health) |
276+ | **Documentlistener (message dispatcher)** | 5099 | [https://documentlistener.oneground.local/health](https://documentlistener.oneground.local/health) |
273277
274278### Hosted Tools
275279
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ frontend frontend
9494 acl referentielijsten hdr(host) referentielijsten.oneground.local
9595 use_backend referentielijsten if referentielijsten
9696
97+ acl notificatielistener hdr(host) notificatielistener.oneground.local
98+ use_backend notificatielistener if notificatielistener
99+
100+ acl documentlistener hdr(host) documentlistener.oneground.local
101+ use_backend documentlistener if documentlistener
102+
97103#---------------------------------------------------------------------
98104# Backend settings
99105#---------------------------------------------------------------------
@@ -136,3 +142,13 @@ backend referentielijsten
136142 balance leastconn
137143 option httpchk GET /health
138144 server docker-host host.docker.internal:5018 check
145+
146+ backend notificatielistener
147+ balance leastconn
148+ option httpchk GET /health
149+ server docker-host host.docker.internal:5098 check
150+
151+ backend documentlistener
152+ balance leastconn
153+ option httpchk GET /health
154+ server docker-host host.docker.internal:5099 check
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ WORKDIR /app
2121
2222COPY --from=build /app/publish .
2323
24+ RUN apt-get update -yq \
25+ && apt-get install curl -yq \
26+ && rm -rf /var/lib/apt/lists/*
27+
2428USER $APP_UID
2529
30+ HEALTHCHECK --interval=60s --timeout=5s --retries=3 CMD curl -k -f http://localhost:5000/health || exit 1
31+
2632ENTRYPOINT ["./OneGround.ZGW.Documenten.Messaging.Listener" ]
Original file line number Diff line number Diff line change 1- using Microsoft . Extensions . Hosting ;
1+ using Microsoft . AspNetCore . Builder ;
2+ using Microsoft . Extensions . DependencyInjection ;
23using OneGround . ZGW . Common . Configuration ;
34using OneGround . ZGW . Common . Constants ;
45using OneGround . ZGW . Common . Extensions ;
56using OneGround . ZGW . Common . Web . Extensions . ServiceCollection ;
67using OneGround . ZGW . Documenten . Messaging ;
78
8- var builder = Host . CreateApplicationBuilder ( ) ;
9+ var builder = WebApplication . CreateBuilder ( args ) ;
10+
911builder . ConfigureHostDefaults ( ServiceRoleName . DRC_LISTENER ) ;
1012
13+ builder . Services . AddHealthChecks ( ) ;
14+
1115var serviceConfiguration = new ServiceConfiguration ( builder . Configuration ) ;
1216serviceConfiguration . ConfigureServices ( builder . Services ) ;
1317builder . Services . AddZGWSecretManager ( builder . Configuration ) ;
1418builder . Services . RegisterZgwTokenClient ( builder . Configuration , builder . Environment ) ;
1519
1620var app = builder . Build ( ) ;
1721
18- app . Run ( ) ;
22+ app . MapHealthChecks ( "/health" ) ;
23+
24+ await app . RunAsync ( ) ;
Original file line number Diff line number Diff line change 11{
2+ "$schema" : " https://json.schemastore.org/launchsettings.json" ,
23 "profiles" : {
34 "ZGW.Documenten.Messaging.Listener" : {
45 "commandName" : " Project" ,
56 "environmentVariables" : {
6- "DOTNET_ENVIRONMENT" : " Local"
7- }
7+ "ASPNETCORE_ENVIRONMENT" : " Local"
8+ },
9+ "applicationUrl" : " http://*:5099"
810 },
911 "Docker" : {
1012 "commandName" : " Docker"
1113 }
1214 }
13- }
15+ }
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk.Worker " >
1+ <Project Sdk =" Microsoft.NET.Sdk.Web " >
22 <PropertyGroup >
33 <TargetFramework >net8.0</TargetFramework >
44 <DockerDefaultTargetOS >Linux</DockerDefaultTargetOS >
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ WORKDIR /app
2121
2222COPY --from=build /app/publish .
2323
24+ RUN apt-get update -yq \
25+ && apt-get install curl -yq \
26+ && rm -rf /var/lib/apt/lists/*
27+
2428USER $APP_UID
2529
30+ HEALTHCHECK --interval=60s --timeout=5s --retries=3 CMD curl -k -f http://localhost:5000/health || exit 1
31+
2632ENTRYPOINT ["./OneGround.ZGW.Notificaties.Messaging.Listener" ]
You can’t perform that action at this time.
0 commit comments