Logo
Explore Help
Sign In
jansenj/netbox-docker
1
0
Fork 0
You've already forked netbox-docker
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
netbox-docker/docker/configuration.docker.py

11 lines
305 B
Python
Raw Normal View History

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 11:58:36 +01:00
import importlib.util
import sys
try:
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-03 09:02:19 +02:00
spec = importlib.util.spec_from_file_location('configuration', '/etc/netbox/config/configuration.py')
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 11:58:36 +01:00
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
sys.modules['netbox.configuration'] = module
except:
raise ImportError('')
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 143ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API