Skip to content

Instantly share code, notes, and snippets.

@adamancini
Created January 21, 2021 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamancini/e5d78bb064f0e7584a02313124d0a3bc to your computer and use it in GitHub Desktop.
Save adamancini/e5d78bb064f0e7584a02313124d0a3bc to your computer and use it in GitHub Desktop.
version: '3.6'
services:
on-failure:
image: busybox
command: sh -c 'for i in $$(seq 1 5); do echo -n $$(hostname) && date && sleep 2; done'
deploy:
restart_policy:
condition: on-failure
delay: '2s'
none:
image: busybox
command: sh -c 'for i in $$(seq 1 5); do echo -n $$(hostname) && date && sleep 2; done'
deploy:
restart_policy:
condition: none
delay: '2s'
any:
image: busybox
command: sh -c 'for i in $$(seq 1 5); do echo -n $$(hostname) && date && sleep 2; done'
deploy:
restart_policy:
condition: any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment