Closed Fredouye closed 9 months ago
https://github.com/netbox-community/netbox-docker/wiki/Configuration#custom-configuration-files
You can create you own configuration files if you need to configure something that can't be configured via the environment variables. See the configuration/extra.py file as an example. This works for regular configuration as well as for ldap configuration files, with the little (obvious?) difference that ldap configuration files are placed in configuration/ldap/.
The files are read in the order in which they are received from the system, which usually is alphabetical order. Later files take precedence over previous files. All custom files take precedence over the default configuration files configuration.py and ldap_config.py.
Just call your custom configuration file something else like mysuperspecialconfigurationfile.py
.
If possible, read various settings as FIELD_CHOICES from docker-compose.override.yml, to avoid changes being lost when fetching from Git.
How would this work? FIELD_CHOICES is a python data structure with the rough format of dict[string, tuple[tuple]]. How would you cleanly specify this in yaml and convert to the needed python data structure?
Sorry, I've missed this part of the documentation.
I've added this to docker-compose.override.yml
:
services:
netbox:
volumes:
- ./my-extra-config.py:/etc/netbox/config/extra.py:z,ro
I guess this issue can be closed.
Desired Behavior
Hi
Netbox 3.6.4 installed using the Quickstart.
Using the
docker-compose.override.yml
is a useful way to set LDAP authentication and various settings :But some settings need to be added into
configuration/extra.py
, which is fetched from the Git repo.Contrast to Current Behavior
As stated in the extra.py headers :
Required Changes
No response
Discussion: Benefits and Drawbacks
If possible, read various settings as FIELD_CHOICES from
docker-compose.override.yml
, to avoid changes being lost when fetching from Git.Thanks in advance !