|
| 1 | +{ |
| 2 | + "cron with triggered commands": { |
| 3 | + "comment": "cron with triggered commands", |
| 4 | + "schedule": "* * * * *", |
| 5 | + "command": "echo hello", |
| 6 | + "project": "crontab", |
| 7 | + "container": "myapp", |
| 8 | + "trigger": [{ "command": "echo world", "container": "crontab_myapp_1" }] |
| 9 | + }, |
| 10 | + "map a volume": { |
| 11 | + "comment": "map a volume", |
| 12 | + "schedule": "* * * * *", |
| 13 | + "dockerargs": "-d -v /tmp:/tmp", |
| 14 | + "command": "echo new", |
| 15 | + "image": "alpine:3.5" |
| 16 | + }, |
| 17 | + "use an ENV from inside a container": { |
| 18 | + "comment": "use an ENV from inside a container", |
| 19 | + "schedule": "@hourly", |
| 20 | + "dockerargs": "-d -e FOO=BAR", |
| 21 | + "command": "sh -c 'echo hourly ${FOO}'", |
| 22 | + "image": "alpine:3.5" |
| 23 | + }, |
| 24 | + "trigger every 2 min": { |
| 25 | + "comment": "trigger every 2 min", |
| 26 | + "schedule": "@every 2m", |
| 27 | + "command": "echo 2 minute", |
| 28 | + "image": "alpine:3.5", |
| 29 | + "trigger": [{ "command": "echo world", "container": "crontab_myapp_1" }] |
| 30 | + }, |
| 31 | + "null": { |
| 32 | + "schedule": "*/5 * * * *", |
| 33 | + "command": "/usr/sbin/logrotate /etc/logrotate.conf" |
| 34 | + }, |
| 35 | + "Regenerate Certificate then reload nginx": { |
| 36 | + "comment": "Regenerate Certificate then reload nginx", |
| 37 | + "schedule": "43 6,18 * * *", |
| 38 | + "command": "sh -c 'dehydrated --cron --out /etc/ssl --domain ${LE_DOMAIN} --challenge dns-01 --hook dehydrated-dns'", |
| 39 | + "dockerargs": "--env-file /opt/crontab/env/letsencrypt.env -v webapp_nginx_tls_cert:/etc/ssl -v webapp_nginx_acme_challenge:/var/www/.well-known/acme-challenge", |
| 40 | + "image": "willfarrell/letsencrypt", |
| 41 | + "trigger": [ |
| 42 | + { |
| 43 | + "command": "sh -c '/etc/scripts/make_hpkp ${NGINX_DOMAIN} && /usr/sbin/nginx -t && /usr/sbin/nginx -s reload'", |
| 44 | + "project": "conduit", |
| 45 | + "container": "nginx" |
| 46 | + } |
| 47 | + ], |
| 48 | + "onstart": true |
| 49 | + } |
| 50 | +} |
0 commit comments