mirror of
https://github.com/compose-spec/compose-go.git
synced 2026-11-24 20:00:00 +00:00
restart and deploy.restart_policy are two spellings of one policy: condition is its name and max_attempts its retry count. Each may complete the other, and normalization writes the outcome in restart, so a restart_policy made of a delay alone (docker/compose#14383) leaves restart as it is instead of clobbering it. Where both say something different, deploy.restart_policy wins, as the spec has it and as Docker Compose applies it today: its policy is written into restart (any is always, none is no) and a warning names the service and both values. Nothing is rejected. A retry count only has a meaning for on-failure and a max_attempts of zero is no limit, as for on-failure:0. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
504 lines
14 KiB
504 lines
14 KiB