Closed Munsio closed 7 years ago
At first we have to decide if we want to notify the container via sighub or over the rancher-api. When we include the rancher-api we can send the notify/check cmds thats not possible with signals.
The config could look like this:
api-url: https://rancher-api api-token: 0123456789 [[template]] source = "/etc/rancher-gen/nginx.tmpl" dest = "/etc/nginx/nginx.conf" notify-label = "reload" check-cmd = "/usr/sbin/nginx -t -c {{staging}}" notify-cmd = "/usr/sbin/nginx -s reload"
We could use both.
As a base to determine which container should be notified we can use the notify-label description.
if api-url and token are present we use the rancher-api for the notification
This is now handled by rgon-exec - closing!
[[template]] source = "/etc/rancher-gen/nginx.tmpl" dest = "/etc/nginx/nginx.conf" notify-label = "rgon-proxy:nginx" notify-cmd = "rgon-exec -name={{Name}} -cmd=\"service nginx reload\""
At first we have to decide if we want to notify the container via sighub or over the rancher-api. When we include the rancher-api we can send the notify/check cmds thats not possible with signals.
The config could look like this: