mirror of
https://github.com/reconurge/flowsint.git
synced 2026-07-10 19:43:54 -05:00
fix: make nginx resolver Podman-compatible
Remove Docker-specific resolver (127.0.0.11) in favor of direct proxy_pass, which falls back to the system resolver (/etc/resolv.conf). Mount local nginx.conf into the prod image to override the baked-in config.
This commit is contained in:
@@ -149,6 +149,9 @@ services:
|
||||
ports:
|
||||
# The only network-facing port. Serves the UI and proxies /api/ to the API.
|
||||
- "5173:8080"
|
||||
volumes:
|
||||
# Override the baked-in nginx.conf to use system resolver (Podman-compatible).
|
||||
- ./flowsint-app/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
networks:
|
||||
- flowsint_network
|
||||
depends_on:
|
||||
|
||||
@@ -58,13 +58,11 @@ http {
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
|
||||
# API reverse proxy — same-origin, no CORS needed.
|
||||
# Expects the API service to be reachable as "api:5001" on the Docker network.
|
||||
# Expects the API service to be reachable as "api:5001" on the compose network.
|
||||
# Uses system resolver (/etc/resolv.conf) — compatible with Docker and Podman.
|
||||
# Trade-off: hostname resolved once at startup; restart app if api IP changes.
|
||||
location /api/ {
|
||||
# Resolve at request time via Docker's embedded DNS: survives api
|
||||
# container restarts and lets nginx boot before api is up.
|
||||
resolver 127.0.0.11 valid=10s;
|
||||
set $api_upstream http://api:5001;
|
||||
proxy_pass $api_upstream;
|
||||
proxy_pass http://api:5001;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user