netbox-community / netbox-docker

🐳 Docker Image of NetBox
https://github.com/netbox-community/netbox-docker/wiki
Apache License 2.0
1.74k stars 805 forks source link

Add env var for CENSUS_REPORTING_ENABLED #1133

Closed kindlich closed 6 months ago

kindlich commented 6 months ago

Related Issue: #999

New Behavior

The configuration.py now additionally checks if the env var CENSUS_REPORTING_ENABLED is set and update the netbox settings accordingly.

Contrast to Current Behavior

Before, wanting to change this behaviour required mounting an additional configuration file into the container.

Discussion: Benefits and Drawbacks

This is a simple quality-of-deployment PR to make deployments easier that wish to opt out of the consensus data reporting. This PR is backwards-compatible, as the configuration option is only set if the environment variable is present, which should not be the case for current deployments.

When looking over the changes and you have additional suggestions, please feel free to point them out, for example if you wanted this environment variable to be added to netbox.env

Changes to the Wiki

None

Proposed Release Note Entry

Allow configuration of CENSUS_REPORTING_ENABLED via env vars.

Double Check