Add the openbaar nginx image (serves the Angular app, reverse-proxies /openbaar to the BFF, same-origin) and wire it into the compose stack on :8141, anonymous (no Keycloak dependency). Add it to the health-wait list so the e2e can rely on it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
751 B
Nginx Configuration File
24 lines
751 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Resolve the BFF via Docker's embedded DNS at request time (variable proxy_pass), so nginx starts
|
|
# even before the BFF is up and picks up restarts — instead of failing to load the config.
|
|
resolver 127.0.0.11 ipv6=off valid=30s;
|
|
|
|
# Same-origin API: proxy the anonymous openbaar endpoint group to the bff service. The api-client
|
|
# uses relative URLs, so the browser calls this origin and nginx forwards to the BFF — no CORS.
|
|
location /openbaar/ {
|
|
set $bff http://bff:8080;
|
|
proxy_pass $bff;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
# SPA fallback — Angular client-side routing.
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|