containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
5.01k stars 477 forks source link

Add --health-on-failure, fixes containers/podman-compose#747 #955

Open hunter86bg opened 4 months ago

hunter86bg commented 4 months ago

Contributor Checklist:

This PR adds the option to stop/restart container when healtcheck fails.

hunter86bg commented 4 months ago

@p12tic , what do you think about this one ?

p12tic commented 4 months ago

@hunter86bg As I understand, this is not part of docker-compose specification. Accordingly, on_failure key should be x-podman.on_failure and also it should be documented in https://github.com/containers/podman-compose/blob/main/docs/Extensions.md. Also please add unit tests. There are a lot of examples how to write tests for container_to_args in repository history. For example, see pytests/ part of https://github.com/containers/podman-compose/pull/925.