Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Configuration via labels #840

Open
thueske opened this issue Dec 30, 2024 · 3 comments
Open

Feature request: Configuration via labels #840

thueske opened this issue Dec 30, 2024 · 3 comments

Comments

@thueske
Copy link

thueske commented Dec 30, 2024

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

@thueske thueske changed the title Configuration via labels Feature request: Configuration via labels Dec 30, 2024
@jhuckaby
Copy link
Owner

jhuckaby commented Dec 30, 2024

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

@huanga
Copy link

huanga commented Jan 9, 2025

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.

@jhuckaby
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants