Skip to content

Commit 44a618f

Browse files
refactor: update netbox plugin installation to use uv (#275)
- Update to use uv for plugin installation per upstream changes - Move plugin configuration to /etc/netbox/config/plugins.py - Add plugin_requirements.txt for package management - Create attachments directory for plugin storage Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: carlos@graphops.xyz <carlos@graphops.xyz>
1 parent c5d0aa0 commit 44a618f

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

dockerfiles/netbox/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ ARG NETBOX_VERSION="v4.2.3"
33

44
FROM netboxcommunity/netbox:${NETBOX_VERSION}@sha256:06b882ea0a44c50f212e09babf9a411a759fb8b4c4a3085282bd5e8565b4334b
55

6-
RUN echo "netbox_attachments" >> /opt/netbox/plugin_requirements.txt
6+
COPY plugin_requirements.txt /opt/netbox/
7+
RUN /usr/local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
78

8-
RUN /opt/netbox/venv/bin/pip install netbox-attachments
9+
COPY configuration/plugins.py /etc/netbox/config/plugins.py
910

10-
RUN echo "PLUGINS = ['netbox_attachments']" >> /opt/netbox/netbox/netbox/configuration.py
11+
# Create attachments directory
12+
RUN mkdir -p /opt/netbox/netbox/media/netbox-attachments
13+
14+
RUN DEBUG="true" SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" \
15+
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PLUGINS = ["netbox_attachments"]
2+
3+
# PLUGINS_CONFIG = {
4+
# "netbox_attachments": {
5+
# # ADD YOUR SETTINGS HERE IF NEEDED
6+
# }
7+
# }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
netbox-attachments

0 commit comments

Comments
 (0)