Commit Graph

14 Commits

Author SHA1 Message Date
Christian Mäder
95976f4cf4 Don't load main config twice
Before, the main_config (e.g. 'configuration.py' or 'ldap_config.py') were loaded twice.
The first load was hard-coded and correct.
The second load was during the discovery phase for dynamic configurations.
This has now been fixed. During the discovery for dynamic configurations,
the main_config file is now excluded.

Thanks @tobiasge for discovering this bug.
2021-02-23 22:50:16 +01:00
Christian Mäder
493fc60401 Use black as formatter for python files 2021-02-08 18:24:29 +01:00
Tobias Genannt
d273391773 Gunicorn is replaced with nginx-unit
We now serve Netbox with an nginx-unit instance instead of Gunicorn.
This allows us to get rid of the extra Nginx container because Unit is
also serving the static files. The static files are now collected at container
buildtime instead of every startup.
2021-01-15 09:22:22 +01:00
Christian Mäder
58050e5287 Merge core functionality into configuration.py
Which is the file `docker/configuration.docker.py` in our repo.
The common code is then imported by `docker/ldap_config.docker.py`.
2020-10-26 14:43:11 +01:00
Christian Mäder
ec3fd8a790 Revert accidential change to _read_secret order 2020-10-20 21:36:40 +02:00
Christian Mäder
75554ef5b4 Consistency in namespace name 2020-10-20 21:29:08 +02:00
Christian Mäder
16b567939c Dot character has special meaning in module names
Therefore we esacpe it using the underscore character.
2020-10-20 20:51:43 +02:00
Christian Mäder
43c05d816d Dynamically load configuration files 2020-10-20 20:46:43 +02:00
Tobias Genannt
b46bd58e0a
Move config to /etc/netbox/config (Fixes #54)
With this the configuration is moved to /etc/netbox/config and the
default reports directory is set to /etc/netbox/reports. This enables
the user to mount reports from a config map or persistent volume in
OpenShift.
2018-04-04 10:13:30 +02:00
Tobias Genannt
ef76e4e8ea Modifications for Openshift
With these modifications the netbox containers can run on Openshift.
The configuration files can be imported from a config map to the
'/etc/netbox' directory and will be loaded from there.
2018-02-22 17:22:04 +01:00
Christian Mäder
55c31ae803
🐞 Convert numbers from ENV to int
Fixes #36
2018-01-15 11:33:40 +01:00
Christian Mäder
bd9298e668
❇️ Make the default configuration cluster ready
This changes the default configuration to be better prepared for
usage with container management platforms, such as Docker Swarm,
Kubernetes or OpenShift.

Closes #27.
2017-12-14 12:53:19 +01:00
Viktor Fogelberg
f96ddf1377 Allow setting ENFORCE_GLOBAL_UNIQUE in env 2017-12-01 17:48:20 +01:00
Christian Mäder
94746ac5de
🐞 The upstream repo remove the docker config
.. so I copied it over to this repo.
2017-10-13 10:10:43 +02:00