Skip to content

Add BANNER_MAINTENANCE environment variable to set the Maintenance Banner#1699

Merged
tobiasge merged 2 commits into
netbox-community:developfrom
sweickge:develop
Jul 6, 2026
Merged

Add BANNER_MAINTENANCE environment variable to set the Maintenance Banner#1699
tobiasge merged 2 commits into
netbox-community:developfrom
sweickge:develop

Conversation

@sweickge

@sweickge sweickge commented Jun 4, 2026

Copy link
Copy Markdown

Resubmitting new PR because of branch issue

New Behavior

Add environment variable (BANNER_MAINTENANCE) to be able to set a custom Maintenance Banner in the docker compose override file

This parameter is described in the Netbox documentation: https://netboxlabs.com/docs/netbox/configuration/miscellaneous/#banner_maintenance

Contrast to Current Behavior

Right now, this can not be set as an env var

Discussion: Benefits and Drawbacks

Right now, the only way to set this would be defining the variable in configuration/extra.py, which would require a rebuild of the netbox-docker image anytime it is changed. An env variable would make it easier to change. This is similar to how how other banner variables are currently defined e.g BANNER_TOP and BANNER_BOTTOM.

If approved, I would like to see this change backported as well to a 4.0.X release since that still supports Netbox 4.5.X if that is possible. As 4.6 is still new, we are unable to upgrade at this time. This change would be backwards compatible to any Netbox release that has the BANNER_MAINTENANCE parameter.

Changes to the Wiki

N/A

Proposed Release Note Entry

Enable setting BANNER_MAINTENANCE parameter as an environment variable

Double Check

  • [ x] I have read the comments and followed the PR template.
  • [ x] I have explained my PR according to the information in the comments.
  • [ x] My PR targets the develop branch.

@sweickge

Copy link
Copy Markdown
Author

@tobiasge looks like the CI jobs are failing, but from what I can tell, the cause is outside of my changes

@tobiasge

tobiasge commented Jul 6, 2026

Copy link
Copy Markdown
Member

Could you rebase your branch onto develop again? Then the checks should run and work.

@sweickge

sweickge commented Jul 6, 2026

Copy link
Copy Markdown
Author

Sure thing, I have updated my branch with the latest develop changes

@tobiasge tobiasge enabled auto-merge July 6, 2026 17:45
@tobiasge tobiasge merged commit 3c784a7 into netbox-community:develop Jul 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants