Closed KPTheProf closed 4 months ago
I can't reproduce the problem with the image from Docker Hub. Are you using the correct FROM
tag in your Dockerfile-Plugins
?
Here's the content of Dockerfile-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
RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
Hi @tobiasge, FYI, I've cleaned down all my images and upgraded Docker Desktop to the latest version 4.30 (on Window 11 Pro) and pulled and rebuilt netbox.
If I use https://localhost I get the issue as described. I have found that if I connect directly using http://localhost:8000 I don't get the issue and dark mode stays on.
I'm using the recommended setup for Caddy from the wiki TLS
Here's the section from the Caddy file for localhost.
0.0.0.0, ::0, localhost {
reverse_proxy netbox:8080
encode gzip zstd
tls /etc/ssl/private/localhost.crt /etc/ssl/private/localhost.key
log {
level error
}
}
There were no issues previoulsy with dark mode using TLS until I upgraded to Netbox 4.0.0 (and Netbox-docker 2.9.0) this morning.
Might also be related to https://github.com/netbox-community/netbox/issues/16003
Hi @tobiasge, thanks for pointing that out, I'm not getting the issue this morning and I haven't made any changes. I can only assume that the setmode.js has expired from the cache overnight.
I think that this can be closed, as the fix will be in Fixes #16003: Enable cache busting on upgrade for setmode.js
Below is a screen shot from the debugger for reference. The above fix will add a version number like netbox.js
Current Behavior
After migrating to Netbox-docker version 2.9.0 and Netbox 4.0, dark mode not being kept when refreshing the page.
From the netbox 4.0.0 release notes: Bug Fixes (from Beta2) #15630 - Ensure consistent toggling between light & dark UI modes
From previous working setup of Docker version 3.7.7 and netbox-docker 2.8.0 and upgraded using the following docker compose down git pull docker compose build --no-cache docker compose up --detach
It would appear that the docker version is using Beta2 and not the final production 4.0.0 version?
Expected Behavior
I expect that the dark mode setting is kept between screen refresh.
The public demo at https://demo.netbox.dev/ does not have this issue, so it appears to be only an issue with the docker version.
Docker Compose Version
Docker Compose version v2.26.1-desktop.1
Docker Version
The git Revision
6d25a54d4909edfb4e97356b6097848592039c3c
The git Status
Startup Command
docker compose up --detach
NetBox Logs
Content of docker-compose.override.yml