-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature Request: Explicitly define a internal network in docker-compose. #770
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
Comments
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
@chadwhitacre the bot seems to think this issue isn't accepted. |
Sorry @laundmo, bot went haywire due to error on my part. 😖 Should be back on track now ... |
I wish local network was defined explicitly and available out of the box. x-restart-policy: &restart_policy
restart: unless-stopped
networks:
- local And defining external and local networks in the end of the file: ...
networks:
local:
nginx-proxy:
external: true Now for nginx service you can add both network and all the rest services will still communicate over ...
nginx:
<<: *restart_policy
...
networks:
- nginx-proxy
- local |
@darklow would you be interested in submitting a PR to get this right? |
i don't believe that "external: true" is the correct solution as it means that the network was created ahead of time outside of compose and if wasn't compose will fail. - https://docs.docker.com/compose/networking/#use-a-pre-existing-network for a network to be "internal" aka no route outside you can set internal: true for a network to route outside it should be of type bridge |
@kibble1 i believe the person is running a single nginx instance for all their compose files, which reverse proxies the traffic through that single external network to which all compose files connect. this is a common setup but ultimately not of any relevance to this issue/feature request |
Uh oh!
There was an error while loading. Please reload this page.
Summary
This is a request to explicitly define docker networks in the docker-compose.
Motivation
For the purposes of adding sentry onpremise to existing networks, some containers might need to be added to a external network. This will prevent that container from accessing the default network created by docker-compose. To prevent this from happening, all containers need to be explicitly added to a network that they share with all other containers they need access to.
This is important for cases where users may want to reverse-proxy sentry themselves, especially using something like traefik.
related to #698
The text was updated successfully, but these errors were encountered: