archy/.claude/memory/feedback_indeedhub_nginx_ips.md

18 lines
1.2 KiB
Markdown
Raw Normal View History

---
name: IndeedHub nginx must use hardcoded container IPs
description: IndeedHub's internal nginx config MUST use hardcoded container IPs, not DNS names — podman DNS resolver 127.0.0.11 is unreliable and causes 502 errors
type: feedback
---
IndeedHub's internal nginx config MUST use hardcoded container IPs (e.g., `http://10.89.2.11:4000`) for API, MinIO, and relay upstreams — NEVER DNS names like `http://api:4000` with `resolver 127.0.0.11`.
**Why:** Podman's embedded DNS resolver (127.0.0.11) is unreliable inside containers. Using DNS names with `resolver 127.0.0.11 valid=30s ipv6=off;` causes nginx to return 502 Bad Gateway errors. This broke IndeedHub on all Tailscale nodes — frontend loaded but API calls failed.
**How to apply:** After creating/recreating IndeedHub containers, the deploy script must:
1. Look up container IPs: `podman inspect indeedhub-build_api_1 --format "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}"`
2. Patch the nginx config inside the container to replace DNS names with IPs
3. Also patch `$host``$http_host` in proxy_set_header Host directives
4. Reload nginx inside the container
This is now handled in `deploy-to-target.sh` and `fix-indeedhub-containers.sh`.