Skip to content

fix: use dynamic upstream variables in nginx dev config#48

Open
rubenhensen wants to merge 1 commit intomainfrom
fix/nginx-dev-dynamic-upstream
Open

fix: use dynamic upstream variables in nginx dev config#48
rubenhensen wants to merge 1 commit intomainfrom
fix/nginx-dev-dynamic-upstream

Conversation

@rubenhensen
Copy link
Contributor

@rubenhensen rubenhensen commented Mar 19, 2026

Summary

  • Use variable-based upstream definitions (set $upstream) with Docker's embedded DNS resolver (127.0.0.11) so nginx resolves upstream hostnames at request time rather than at startup
  • This prevents nginx from failing to start when upstream containers (PKG, IRMA, website) are not yet available
  • Fix proxy_pass rewriting for /pkg/ and /irma/ locations using explicit rewrite rules

Test plan

  • docker compose up starts without nginx errors even if other services are slow to start
  • /pkg/ requests are correctly proxied to postguard-pkg:8087
  • /irma/ requests are correctly proxied to irma-server:8088

Use variable-based upstream definitions with Docker's embedded DNS
resolver (127.0.0.11) to prevent nginx from failing to start when
upstream containers are not yet available. Also fixes proxy_pass
rewriting for /pkg/ and /irma/ locations.
@rubenhensen
Copy link
Contributor Author

Double check if this is necessary. Maybe my docker-compose was just having a bad day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant