diff --git a/client/nginx/default.conf b/client/nginx/default.conf index 7651bae..1067eee 100644 --- a/client/nginx/default.conf +++ b/client/nginx/default.conf @@ -13,7 +13,11 @@ server { } location /api/ { - set $backend http://server:3000; + # Use a globally-unique hostname across attached Docker networks. + # `client` is connected to both `toir-light` and external `proxy` networks, + # so a generic name like `server` can resolve to multiple containers and + # cause intermittent routing (200/404 flapping). + set $backend http://toir-light-server:3000; proxy_pass $backend; proxy_http_version 1.1; proxy_set_header Host $host;