Cli: Add support for --health-start-period in Compose/Stack file

Created on 22 May 2017  Â·  17Comments  Â·  Source: docker/cli

Description

With Docker CE 17.05 there is the brand new --health-start-period option for a service, implemented with https://github.com/moby/moby/pull/28938. But there is no such option available in a Compose/Stack file, so we can properly manage it with a YAML file.

I think I'm not qualified to propose the key name that should eventually implemented in theCompose file but I'd say that start_period, under healthcheck could be a good name.

arestack kinenhancement

Most helpful comment

It was added to v3.4 of the compose file, what version do you have in the file?

All 17 comments

Should this be against the docker/compose project as opposed to the docker/cli?

@electrofelix Don't know, @thaJeztah pointed me to this repo. My request is that this config should be implemented in Stack and should be gracefully ignored in Compose

Having see this appear in CE, I was going to open a request in the compose project for it to be supported when I stumbled across this issue. Noticed that the code in this repo already supports a --health-start-period, but couldn't find any connection between as to where issues belong, so just a little confused as to whether I should only track this issue or log a separate one for the behaviour to be added to compose ahead for the 17.06 release which I'm guessing will be the first stable release to include this?

Is there an issue in compose project?

ping @shin- do you know? ^^

https://github.com/docker/compose/issues/4646 is the closest we've had, but now that the feature's in engine we can open a new ticket.

@thaJeztah and what about Stack, which is where the issue is more relevant? Right now I have to deploy a stack with a yaml file and then issue a docker service update ASAP to update the healthcheck-start-period so my service can actually start and not be killed over and over by Swarm

  • 1
    I' m borther by this problem more than 48 hours.

@vdemeester Since you are the assignee, can you tell us if/when this is going to be implemented? Thanks :)

@vide ohh dang it I forgot about that one… :thinking: I'll try to work on sthg during August 👼 (so I'm hoping to get it in 17.08 or at least in 17.09 (stable)

Still targeted for 17.08?

Submit the PR #475

@denverdino thanks for the PR! I'll update my preprod cluster to 17.09 ASAP and try it out

as commented in the pull request:
Not working for me with 17.09 CE

tried with
start-period and start_period

It was added to v3.4 of the compose file, what version do you have in the file?

just updated to v3.4 . Looks good!
Started and could find the "StartPeriod" with docker inspect.

Thanks!

Here is the corresponding pull https://github.com/docker/compose/pull/5101

Was this page helpful?
0 / 5 - 0 ratings