mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-04-23 16:08:27 +02:00
Handle plugins + add healtcheck plugin
Support the installation of plugins, and add the healthcheck plugin, which we use for status reports to the reverse proxy servers, as a first one. Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
This commit is contained in:
parent
80b217abc8
commit
ff467efbe3
12
Dockerfile
12
Dockerfile
@ -66,6 +66,18 @@ COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
|
|||||||
COPY configuration/ /etc/netbox/config/
|
COPY configuration/ /etc/netbox/config/
|
||||||
COPY docker/nginx-unit.json /etc/unit/
|
COPY docker/nginx-unit.json /etc/unit/
|
||||||
|
|
||||||
|
# Plugins and plugin configuration
|
||||||
|
COPY ./plugin_requirements.txt /opt/netbox/
|
||||||
|
COPY configuration/configuration.py /etc/netbox/config/configuration.py
|
||||||
|
COPY configuration/plugins.py /etc/netbox/config/plugins.py
|
||||||
|
|
||||||
|
# Plugin configuration only possible via settings.py
|
||||||
|
COPY ./local_settings.py /opt/netbox/netbox/netbox/
|
||||||
|
|
||||||
|
# Install plugins
|
||||||
|
RUN /opt/netbox/venv/bin/pip install --no-warn-script-location -r /opt/netbox/plugin_requirements.txt
|
||||||
|
RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
||||||
|
|
||||||
WORKDIR /opt/netbox/netbox
|
WORKDIR /opt/netbox/netbox
|
||||||
|
|
||||||
# Must set permissions for '/opt/netbox/netbox/media' directory
|
# Must set permissions for '/opt/netbox/netbox/media' directory
|
||||||
|
4
local_settings.py
Normal file
4
local_settings.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
from os import environ
|
||||||
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
REDIS_URL = f"redis://:{quote(environ.get('REDIS_PASSWORD', ''))}@{environ.get('REDIS_HOST', 'localhost')}:{environ.get('REDIS_PORT', '6379')}/{environ.get('REDIS_DATABASE', '1')}"
|
1
plugin_requirements.txt
Normal file
1
plugin_requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
git+https://github.com/netbox-community/netbox-healthcheck-plugin
|
Loading…
Reference in New Issue
Block a user