Cronicle icon indicating copy to clipboard operation
Cronicle copied to clipboard

Feature request: Configuration via labels

Open twiesing opened this issue 1 year ago • 3 comments

Like this: https://github.com/mcuadros/ofelia?tab=readme-ov-file#docker-labels-configurations

twiesing avatar Dec 30 '24 21:12 twiesing

You can do this with environment variables, which you can set with the docker -e switch. Example:

docker blah blah -e CRONICLE_secret_key="MySecretKey" -e CRONICLE_base_app_url="http://cronicle.mycompany.com"

Docs: https://github.com/jhuckaby/Cronicle/blob/master/docs/CommandLine.md#environment-variables

jhuckaby avatar Dec 30 '24 22:12 jhuckaby

I think the objective here is more to enable Cronicle to trigger things on other containers.

Imagine if Cronicle is given docker.sock or another means to interact with docker API, then Cronicle can see containers and their labels. The user can then annotate their docker containers to provide instructions to Cronicle as to what is expected. So maybe for example I have a long running container with some code I've written, I can use labels to tell Cronicle "Hey, run node data_ingestion.js every 10 minutes, and run node data_summary.js every hour in this container". In this way, I don't need to customize crontab inside that container, and I can have a centralized place to review all my executions across multiple containers.

huanga avatar Jan 09 '25 17:01 huanga

You could certainly write a Plugin to facilitate that.

I should also mention that Cronicle v2 is going to have a very small "satellite" executable that can be installed with a single command on any server. It has no dependencies -- not even Node.js. The idea here is, you can install the satellite on all your Docker containers, so they can run jobs from inside each one. Also, importantly, the satellite doesn't need any ports exposed or routed, because it connects to the master server, not the other way around. So it can truly run anywhere, even on minimal containers, and run jobs that way. Cronicle v2 will be released in 2025.

jhuckaby avatar Jan 10 '25 02:01 jhuckaby