'Multiple SWAG Container for multiple hosts/vnic

i hope you are able to help me.

I have two hosts/VNICs (Virtual Network Interface Card) for my Oracle Cloud Instance with one public and one private IP each.

I try to run one SWAG-Docker-Container with a different domain on each IP, like:

 VNIC 1 (with Subnet 1), Domain1, IP1, SWAG1


 VNIC 2 (with Subnet 2), Domain2, IP2, SWAG2 

The port-config of the SWAG Containers looks like that (docker-compose):

  ports:
     - Host-IP:internalPort:externalPort

The SWAG1 is up and running and I am able to reach it over the internet. But I do not reach the SWAG2 over the internet.

Maybe i have to edit the second docker network? Because the docker network uses always the primary vnic?

Of course I edited the default SWAG-config under /swag/config/nginx/site-confs and added the domain as the server-name.

Thank you for your help :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source