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

How I can do logging via docker labels and no ini file? #303

Open
nicgord opened this issue Nov 23, 2024 · 1 comment
Open

How I can do logging via docker labels and no ini file? #303

nicgord opened this issue Nov 23, 2024 · 1 comment

Comments

@nicgord
Copy link

nicgord commented Nov 23, 2024

The below says logging can be configured via docker labels (these are configured under global in the ini file).
Anyone have an exapmle and can show how to set smtp-host/smtp-port etc in the docker command line?

These can be configured by setting the options listed below in the [global] section of your config.ini, or via docker labels

@nicgord nicgord changed the title Can someone share how I can do logging.email via docker labels? How I can do logging via docker labels and no ini file? Nov 23, 2024
@poplawskidaniel
Copy link

poplawskidaniel commented Jan 11, 2025

Just use labels in your container like: ofelia.GLOBAL_CONFIG_OPTION=VALUE eg: ofelia.smtp-host=host.

Modified example that should work:

    docker run -it --rm \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    --label ofelia.smtp-host="localhost" \
    --label ofelia.smtp-port="8000" \
    --label ofelia.job-local.my-test-job.schedule="@every 5s" \
    --label ofelia.job-local.my-test-job.command="date" \
        mcuadros/ofelia:latest daemon --docker

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

2 participants