Reverse proxy setup advice


Solverz

Recommended Posts

Configuration:

 

Firewalll 443 --> docker br0 network --> Swag port 443  --> docker user defined bridge network --> Service containers

 

Swag has two networks connected to it, br0 & a user defined bridge. So connections externally comes through to swag on br0 and proxy to the service containers through user definded bridge.

 

This works fine, however to conenct Swag to a second network I have to use the command "docker network connect networkname containername". So when the docker container swag is updated the docker run command is of course run with the defined parameters in the unraid gui which will not of course include the second network.

Unfortunately, from reading through the docker documentation it doesnt look like it is possible to specify two networks using docker run and I have to manually use the docker network connect command to connect swag to the second network every time swag needs to be updated. This is not ideal for me.

 

Some might say only connect swag to a user defined network and map to an available port on the docker host (unraid) and port forward to that non standard port, however the reason it is connected to the br0 MACVLAN network is because swag needs a different ip to the host so it can use port 443. this is due to my firewall not allowing port redirection and only port forwarding and I need port 443 forwarded so I do not need to specify a port explicitly in the browser when using https.

 

So my question is, is there a way to make a docker container like swag connect to a second docker network when it is re created due to updates etc? or is there a better way to handle the above?

 

Appreciate any help or advice!

 

 

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.