@MladenKobiljski do you know what docker network mode the nginx container is using?
If it’s using the default docker networking mode (bridge), one option might be to try using an upstream of 172.17.0.1:8080 instead of 127.0.0.1:8080
Another option, depending on your environment setup and needs, might be to try starting the nginx container using the host networking mode instead which should give it access to 127.0.0.1:8080 without changing nginx.conf.
I’m going to try these out myself in a bit (as I’m still fighting the same issue as you) and will report back here