mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-30 11:53:17 +01:00
ef76e4e8ea
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.
11 lines
298 B
Python
11 lines
298 B
Python
import importlib.util
|
|
import sys
|
|
|
|
try:
|
|
spec = importlib.util.spec_from_file_location('configuration', '/etc/netbox/configuration.py')
|
|
module = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(module)
|
|
sys.modules['netbox.configuration'] = module
|
|
except:
|
|
raise ImportError('')
|