Plugin requiring its own collectstatic #459
-
Good Day, I'm attempting to use nextbox-ui-plugin (https://github.com/iDebugAll/nextbox-ui-plugin). I'm having issues with running collectstatic for this plugin (currently I'm getting 404s to /static/nextbox_ui_plugin/next_app.js and anything else in the /static/nextbox_ui_plugin/ folder). Looking into the container I found the netbox_ui_plugin folder wasn't there. As such I altered the Dockerfile-Plugins as follows to collect the files after installing the extra packages:
The output of the 'docker-compose build --no-cache' is as follows:
No updates are being made so somehow its not picking up on the extra plugins to be added to the static files. If I docker exec -it /bin/bash in and attempt to do it manually I get permission errors:
Is there something obvious I'm doing wrong? Either way any plugins that require collect static files I would guess don't work with this project (if I do a "collectstatic --clear" it fails as well for the same permission issues so I can't really say a plugin that does not have it's files in a separate folder would work either). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, What is happening is this: When you run Add the following line to your COPY configuration/load_plugin.py /etc/netbox/config/load_plugin.py The file PLUGINS = ['nextbox_ui_plugin']
PLUGINS_CONFIG = {
'nextbox_ui_plugin': {
# The settings you want
}
} |
Beta Was this translation helpful? Give feedback.
Hello,
I converted this to a discussion. I don't think this is an actual bug.
What is happening is this: When you run
collectstatic
in yourDockerfile
the plugin is not loaded because you didn't include a config file that does just that.Add the following line to your
Dockerfile
before thecollectstatic
line:COPY configuration/load_plugin.py /etc/netbox/config/load_plugin.py
The file
configuration/load_plugin.py
should contain the plugin configuration: