Skip to content

Use CLI flags for configuration instead of environment variables #113

Open
@sisp

Description

Expected Behaviour

of-watchdog should be configurable using CLI flags instead of environment variables.

Current Behaviour

of-watchdog is only configurable using environment variables.

Possible Solution

Add CLI flags for configuration. To retain backward compatibility, environment variables can be used when no CLI flags are provided. If at least one CLI flag is provided, environment variables should be ignored and the default value of any unprovided CLI flag should be used instead.

Context

of-watchdog starts a webserver in a child process, i.e. of-watchdog and the actual webserver run in the same environment (typically a Docker container). It is possible (and likely) that the webserver is also configured using environment variables, and there is a chance that some environment variables are the same for of-watchdog and the webserver. This can lead to a bad configuration, e.g. if the webserver uses the environment variable port (which is used by of-watchdog, too), of-watchdog is configured to listen on the same port as the webserver which (a) is unexpected and (b) leads to a port collision.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions