I have a setup with an internal network for the containers to communicate together.
All the containers are on this network.
I also have one container that needs to be directly accessible from the outside (I’m trying to avoid going through the reverse proxy since it’s going to be a lot of requests as users will poll that connection).
I have a reserved IP on the server for this container.
I managed to get it accessible from the outside by adding to the docker-compose.yml file:
- ports:
'external_ip:443:443'
The container is accessible from the outside, but I can’t add the common network, so it looks like I can either be on the internal network, or accessible from the outside.
I need all incoming connections on that external_ip to arrive straight to the container, but the container needs access to the internal network as well.
How can I achieve this (ideally within docker-compose)