Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aduzsardi opened this issue Jul 8, 2020 · 6 comments
Open

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

aduzsardi opened this issue Jul 8, 2020 · 6 comments
Labels

Comments

@aduzsardi
Copy link

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 emk added the question label Jul 8, 2020
@emk
Copy link
Contributor

emk commented Jul 8, 2020

Yes, within a pod you can use depends_on normally.

@emk emk closed this as completed Jul 8, 2020
@aduzsardi
Copy link
Author

aduzsardi commented Jul 8, 2020

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
Copy link
Contributor

emk commented Jul 27, 2020

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

@aduzsardi
Copy link
Author

Yes , it's v3 only

@emk
Copy link
Contributor

emk commented Jul 27, 2020

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.

@emk emk changed the title Depended on services in pods depends_on with health checks (requires compose.yml v3) Jul 27, 2020
@emk emk reopened this Jul 27, 2020
@aduzsardi
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants