faradayio / cage

Develop and deploy complex Docker applications
http://cage.faraday.io
Apache License 2.0
307 stars 26 forks source link

depends_on with health checks (requires compose.yml v3) #106

Open aduzsardi opened 4 years ago

aduzsardi commented 4 years ago

Hi, Can you have dependencies between services in a pod ? like serviceA should start before serviceB where both services are in the same yaml file

emk commented 4 years ago

Yes, within a pod you can use depends_on normally.

aduzsardi commented 4 years ago

Thank you , i forgot i can use only v2 compose directives so no heath check conditions in depends_on

    depends_on:
      api:
        condition: service_healthy
emk commented 4 years ago

Ah, yes, that would be a nice thing to support. Is it v3 only?

aduzsardi commented 4 years ago

Yes , it's v3 only

emk commented 4 years ago

Right now, we support multiple versions of v2, but we don't really have any APIs for supporting v3, and I'm not even sure how I should handle v2 and v3 support. Migrate everything to v3 internally when we load it, maybe? Hmm.

aduzsardi commented 4 years ago

I don't know why i was under the impression that it's only in v3 , seems like i was mistaken https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on