You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, a service has 3 network aliases: container name, service name, container id.
Would be great to have one more default alias which would be computed from docker compose project name and service name. For example: project name: micro1, service name: app, so the alias would be: micro1-app.
This alias would help with solving the problem with DNS service name collisions when multiple Docker Compose projects are connected together with external networks.
Just running into this as well. Took me a long time to figure out that my requests to db were going to the other projects container instance, instead of the one in my current project... All because they share a unified external proxy that network so traefik can handle dynamic routing.
Description
By default, a service has 3 network aliases: container name, service name, container id.
Would be great to have one more default alias which would be computed from
docker compose project name
andservice name
. For example: project name:micro1
, service name:app
, so the alias would be:micro1-app
.This alias would help with solving the problem with DNS service name collisions when multiple Docker Compose projects are connected together with external networks.
Example:
The service
web
from composeA
calling serviceapp
may call his internal serviceapp
or external service app from composeB
.Having a default alias like
docker compose project name
andservice name
would resolve the problem.Currently, without this feature, I see 2 solutions:
It there is another solution, please write in comments.
Thank you.
The text was updated successfully, but these errors were encountered: