fix(Grafana x nginx): resolved grafana upstream under podman (with sc… - #68
Merged
Conversation
…ript at container start)
thinkDifferent1997
self-requested a review
August 11, 2026 19:59
thinkDifferent1997
approved these changes
Aug 11, 2026
EstebanGondim
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Grafana 502 behind nginx on rootless podman
Problem
The
/grafana/locations use runtime DNS resolution (resolverdirective + variable inproxy_pass) so nginx survives a missing grafana container. The resolver was hardcoded to127.0.0.11— that's Docker's embedded DNS and doesn't exist under rootless podman (school setup), where aardvark-dns listens on a network-dependent address instead (e.g.10.89.0.1).Result: every
/grafana/request returned 502, while frontend/API kept working — theirupstream {}blocks resolve at startup viaresolv.conf, which is correct under both runtimes.Fix
New entrypoint drop-in
nginx/10-podman-resolver.sh, executed via the official nginx image's/docker-entrypoint.d/mechanism before nginx starts:resolv.conf127.0.0.11, i.e. under DockerThe nginx config files themselves are unchanged —
127.0.0.11stays in as the Docker default. Two lines added tonginx/Dockerfile(COPY+chmod +x).How to test (podman / school setup)