Add plugin examples to the repo, and adjust .gitignore to avoid checking in local configuration

This commit is contained in:
Per von Zweigbergk 2023-08-16 08:00:35 +02:00
parent 22486fefb5
commit 8642d1919a
6 changed files with 43 additions and 14 deletions

3
.gitignore vendored
View File

@ -10,6 +10,7 @@ configuration/ldap/*
!configuration/ldap/extra.py !configuration/ldap/extra.py
!configuration/ldap/ldap_config.py !configuration/ldap/ldap_config.py
!configuration/logging.py !configuration/logging.py
!configuration/plugins.py !configuration/plugins.py.example
prometheus.yml prometheus.yml
super-linter.log super-linter.log
plugin_requirements.txt

11
Dockerfile-Plugins Normal file
View File

@ -0,0 +1,11 @@
# See: https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
FROM netboxcommunity/netbox:latest
COPY ./plugin_requirements.txt /opt/netbox/
RUN /opt/netbox/venv/bin/pip install --no-warn-script-location -r /opt/netbox/plugin_requirements.txt
# These lines are only required if your plugin has its own static files.
COPY configuration/configuration.py /etc/netbox/config/configuration.py
COPY configuration/plugins.py /etc/netbox/config/plugins.py
# NOTE: This SECRET_KEY is only used during the installation. There's no need to change it.
RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input

View File

@ -1,13 +0,0 @@
# Add your plugins and plugin settings here.
# Of course uncomment this file out.
# To learn how to build images with your required plugins
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
# PLUGINS = ["netbox_bgp"]
# PLUGINS_CONFIG = {
# "netbox_bgp": {
# ADD YOUR SETTINGS HERE
# }
# }

View File

@ -0,0 +1,8 @@
# See: https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
PLUGINS = ["netbox_secrets"]
# PLUGINS_CONFIG = {
# "netbox_secretstore": {
# ADD YOUR SETTINGS HERE
# }
# }

View File

@ -0,0 +1,20 @@
# See: https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
version: '3.4' # This is NOT the version of NetBox! No need to adjust :)
services:
netbox:
image: netbox:latest-plugins
ports:
- 8000:8080
build:
context: .
dockerfile: Dockerfile-Plugins
netbox-worker:
image: netbox:latest-plugins
build:
context: .
dockerfile: Dockerfile-Plugins
netbox-housekeeping:
image: netbox:latest-plugins
build:
context: .
dockerfile: Dockerfile-Plugins

View File

@ -0,0 +1,2 @@
# See: https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
netbox-secrets