intermediateDocker Compose: Services, Networks, Volumes, Scaling & Health Checks

How does service discovery work in Compose without any extra configuration?

Compose automatically creates a dedicated user-defined bridge network for the project and attaches every service to it. Because user-defined bridge networks include embedded DNS, each service can resolve every other service by its service name (e.g., a JDBC URL of jdbc:postgresql://db:5432/appdb), with no manual network setup required.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

How does service discovery work in Compose without any extra configuration?

Next Step

Continue to How would you scale a service with Docker Compose, and what constraint does that introduce?← Back to all Docker questions