Compose V2 cross-profile depends_on startup with inactive dependency profile
0 reputation · 31 Mar 2020, 14:32 UTC
Compose V2 cross-profile depends_on startup with inactive dependency profile
I am defining a stack in Compose V2 where an unprofiled frontend service declares depends_on a backend service gated by the debug profile. When I run the stack without selecting debug, I need to know whether Compose creates the frontend anyway or blocks startup because the dependency is unavailable.
Profile-gated services are excluded from containers, networks, and volumes when their profile is not selected, and depends_on controls startup order only without waiting for readiness. Compose V2 behavior can differ between Docker Engine, Docker Desktop, and standalone Compose releases, so the compatibility boundary for inactive-profile dependencies is unclear.
Does Compose V2 proceed with the dependent service when the depends_on target belongs to an inactive profile? Is this behavior stable across Compose V2 point releases, or should each target Docker Desktop version be checked separately?