-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine docker network configuration #562
Comments
I'm afk, so I'll check when I get home, but I'm fairly sure that's only applicable to non-docker swarm containers. There is and has been a divide between docker compose and docker swarm and docker swarm does not work seamlessly with docker compose. I'm fairly certain you need to create the networks via the docker swarm api. Fingers crossed I'm wrong. |
Revisiting this, there are several issues as to why this does not work in our context. The main and most important being that the Another potential issue is network persistence. There is not a straightforward way to just create the networks needed for our deployment and have them live longer than the services themselves. Meaning, you would need to recreate the docker networks each time you redeploy or at least be very careful that you don't destroy the networks when you are doing a service upgrade for example. |
Still looking through details, but:
I believe overlay networks (which we have to use) are swarm scoped by default, so that saves our asses in this circumstance. I'm looking through some of the macvlan stuff. Luckily, only one network is set up for that and we're using three or four of them. |
Yeah, ideally we could have a separate docker compose file that just creates the networks. Im not sure if that is possible though. I tried to do that with |
Moby, the open source go library for docker (once was the official api and still pretty much is before docker went more corporate), has some good documentation on the |
Thanks for the link - wasn't easy to find. |
The current process for deploying currently requires some complicated steps revolving around setting up networks. Things in docker are more streamlined now compared to when this project started, so some of the more complicated steps can be smoothed out. For example, the following in one of the deployment scripts can be pushed out to the docker-compose file:
to:
(just an example - the 'real' solution would still need to be worked out)
The subnet and gateway definitions may no longer be needed. This change will cut down on some extra environment variables and scripts, making the project easier to maintain.
The text was updated successfully, but these errors were encountered: