ofelia
ofelia copied to clipboard
Live jobs discovery from docker labels
It would be nice to discover jobs looking at container and services tags (à la traefik)
eg, in a docker-compose file :
labels:
- ofelia.schedule: "@hourly"
- ofelia.command: "touch /tmp/example"
it could support job-exec and job-service-run (once #49 is merged) or maybe a job-service-exec style
this would make it much easier to work with as you wouldn't have to give access to the container running ofelia or its configuration to the user running app containers or stacks
the idea come from traefik and https://github.com/vfarcic/docker-flow-cron but this project is not ready nor very active
Awesome feature! I'm just thinking of this when I had to change my config file because my container changes it's name...
With label, it will be easily flexible and reusable! Totally need this feature :heart:
This feature would be awesome. Trane9991's fork ( mentioned in https://github.com/mcuadros/ofelia/issues/66#issuecomment-475956283 ) has this implemented.
This is indeed a great feature, and it works wonderfully with Traefik. The one thing I'm noticing that's different is that it's looking at container labels, instead of service labels, and when a service updates itself, Ofelia isn't picking up the new containers that come from that, so you'd need to restart it every time you update a service.
Is it possible for Ofelia to periodically poll Docker for labels, instead of just doing it once at startup?
Manual restart ofelia every time after changing containers labels is a big sadness.
Very related to #137