compose icon indicating copy to clipboard operation
compose copied to clipboard

A new lifecycle hook which executes after service becomes healthy

Open Chostakovitch opened this issue 3 months ago • 1 comments

Description

Hello there!

Not sure about the idea because I don't have the whole background behind lifecycle hooks.

I have use cases where I need to run a command with specific user/env after initialization, i.e. when the container is healthy. Doing so with external tools feels hackish; lifecycle hooks feels elegant to me in that case.

post_start probably shouldn't wait for healthiness when used as an entrypoint, right? So it could be either another hook or an option.

Do you think it could be a relevant, general use case? If so, what approach would you prefer?

Thanks!

Chostakovitch avatar Sep 04 '25 12:09 Chostakovitch

We had this one in mind as we introduced service hooks, just delayed to check adoption and actual usages

ndeloof avatar Sep 04 '25 13:09 ndeloof