ofelia
ofelia copied to clipboard
docker-compose / scaled container support
Would be nice to be nice to be able to trigger a script on all instances of a container. Using docker-compose you can end up with docker_nginx_1, docker_nginx_2, ..., docker_nginx_N after scaling nginx up.
Proposal:
Add in the use of
[job-exec "job-executed-on-running-container"]
schedule = @hourly
compose-project= docker
container = nginx
command = /etc/init.d/nginx reload
As a dynamic shortcut for:
[job-exec "job-executed-on-running-container"]
schedule = @hourly
container = docker_nginx_1
command = /etc/init.d/nginx reload
[job-exec "job-executed-on-running-container"]
schedule = @hourly
container = docker_nginx_2
command = /etc/init.d/nginx reload
Where compose-project is -p, --project-name NAME Specify an alternate project name (default: directory name).
Thought?
Yes, looks interesting a PR is welcome
If I knew go, I totally would. Maybe a future side project when I can find the time.
should easily be manageable with labels now.