williamwgant

joined 2 years ago
 

Greetings,

I started out by spinning up a number of docker-compose setups for various things. Initially, I set everything up with static IP addresses, but I later understood that nginx proxy manager can, if on the same network as a container, reference the container by hostname (or so I thought). However, after moving a few containers over to just being on the network, nginx now returns a bad gateway error on those containers. Am I just misunderstanding something? NGINX proxy manager is on that network as well (I just have one network for the moment). Any ideas of what I could be doing wrong?

Edit: A little more info. All the containers are mapped in nginx proxy manager using their hostname. Everything worked, until I stopped specifying a static IP for the containers. Then everything choked. It's almost as if they disappeared off the docker network at that point, even though they were set to be on it.

 

Greetings,

I have a fair few docker containers running on my NAS. As I was learning docker, I made various mistakes, some of which weren't too bad to fix. However, there is one glaring, really nasty, dumb mistake I made in the beginning which I'd like to correct. All of my docker containers are on the same network and have the same address range (192.168.10.128-192.168.10.254). They are currently all hardcoded.

In general, other than a couple things (my instance of pihole, and nginx proxy manager), I believe that most things would be better served with dynamic IPs, mainly because this gets rid of one more thing I have to track. They also don't really have to have IPs visible outside the docker environment at all, since all of them are referenced by container name from nginx proxy manager.

I figure the stuff that needs to remain static can just be moved to a static address less than 128. But what's the least awful way to move the rest? All my docker compose files are stored in a git repo and are set up in portainer to check for updates every 10 minutes or so. Would it be best to just bulk update everything and let portainer take care of it or will that bust a bunch of stuff. How would you do it without pulling your hair out if you were me?