Error AtlasError Documentation and Resolution

Docker Compose service model is invalid because profiles break depends_on

service model is invalid regarding the depends_on constraint

Docker Compose found that enabled service profiles make the dependency model invalid, so a service depends on another service that is not part of the active model.

service model is invalid regarding the depends_on constraintcompose
service model is invalid regarding the depends_on constraint
  • A service depends on another service that is excluded by the currently active profiles.
  • Compose profiles split required services across incompatible profile sets.
  • A service graph that is valid in one profile combination is invalid in another.
  1. Ensure services that depend on each other can be active together under the same profile set.
  2. Adjust the profiles so required dependencies are not excluded from the active model.
  3. Test docker compose config with the intended profile combinations before running the stack.
Docker Docs: Compose file profiles
Docker Compose invalid regarding the depends_on constraint | Error Atlas