.
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
FROM ghcr.io/netbox-community/netbox:latest
|
||||
FROM netboxcommunity/netbox:latest
|
||||
|
||||
# Switch to root to install packages and create directories
|
||||
USER root
|
||||
|
||||
RUN mkdir -p /opt/netbox/netbox/static/netbox_topology_views/img
|
||||
|
||||
COPY requirements-plugins.txt /opt/netbox/plugin_requirements.txt
|
||||
# Copy plugin requirements
|
||||
COPY ./plugin_requirements.txt /opt/netbox/
|
||||
|
||||
# Install plugins using uv (the official way in netbox-docker)
|
||||
# THIS IS THE KEY - use /usr/local/bin/uv pip install, not plain pip!
|
||||
RUN /usr/local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
|
||||
|
||||
USER unit
|
||||
# Create required directory for Topology Views images
|
||||
RUN mkdir -p /opt/netbox/netbox/static/netbox_topology_views/img &&
|
||||
chown -R unit:root /opt/netbox/netbox/static/netbox_topology_views
|
||||
|
||||
# Collect static files
|
||||
# SECRET_KEY must be 50+ characters!
|
||||
RUN SECRET_KEY="dummyKeyWithMinimumLength-------------------------dsflgjkkljh3l4hkj6T#$%#alskjhdglhjkasdlkghjl"
|
||||
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
||||
|
||||
# Switch back to unit user
|
||||
USER unit
|
||||
|
||||
WORKDIR /opt/netbox/netbox
|
||||
@@ -1,3 +1,3 @@
|
||||
netbox-topology-views
|
||||
netbox-plugin-dns
|
||||
netbox-routing
|
||||
netbox-topology-views==4.4.0
|
||||
netbox-secrets==2.4.1
|
||||
pycryptodome
|
||||
@@ -5,14 +5,23 @@ metadata:
|
||||
namespace: netbox
|
||||
data:
|
||||
plugins.py: |
|
||||
# NetBox Plugins Configuration
|
||||
|
||||
PLUGINS = [
|
||||
"netbox_topology_views",
|
||||
"netbox_dns",
|
||||
'netbox_topology_views',
|
||||
'netbox_secrets'
|
||||
]
|
||||
|
||||
PLUGINS_CONFIG = {
|
||||
"netbox_topology_views": {},
|
||||
"netbox_dns": {},
|
||||
'netbox_topology_views': {
|
||||
'static_image_directory': 'netbox_topology_views/img',
|
||||
'allow_coordinates_saving': True,
|
||||
'always_save_coordinates': True
|
||||
},
|
||||
'netbox_secrets': {
|
||||
'top_level_menu': True,
|
||||
'public_key_size': 2048
|
||||
}
|
||||
}
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
Reference in New Issue
Block a user