forked from willfarrell/docker-crontab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sample.json
47 lines (47 loc) · 1.36 KB
/
config.sample.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[{
"comment":"cron with triggered commands",
"schedule":"* * * * *",
"command":"echo hello",
"project":"crontab",
"container":"myapp",
"trigger":[{
"command":"echo world",
"container":"crontab_myapp_1"
}]
},{
"comment":"map a volume",
"schedule":"* * * * *",
"dockerargs":"-d -v /tmp:/tmp",
"command":"echo new",
"image":"alpine:3.5"
},{
"comment":"use an ENV from inside a container",
"schedule":"@hourly",
"dockerargs":"-d -e FOO=BAR",
"command":"sh -c 'echo hourly ${FOO}'",
"image":"alpine:3.5"
},{
"comment":"trigger every 2 min",
"schedule":"@every 2m",
"command":"echo 2 minute",
"image":"alpine:3.5",
"trigger":[{
"command":"echo world",
"container":"crontab_myapp_1"
}]
},{
"schedule":"*/5 * * * *",
"command":"/usr/sbin/logrotate /etc/logrotate.conf"
},{
"comment":"Regenerate Certificate then reload nginx",
"schedule":"43 6,18 * * *",
"command":"sh -c 'dehydrated --cron --out /etc/ssl --domain ${LE_DOMAIN} --challenge dns-01 --hook dehydrated-dns'",
"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",
"image":"willfarrell/letsencrypt",
"trigger":[{
"command":"sh -c '/etc/scripts/make_hpkp ${NGINX_DOMAIN} && /usr/sbin/nginx -t && /usr/sbin/nginx -s reload'",
"project":"conduit",
"container":"nginx"
}],
"onstart":true
}]