Skip to content

Commit 8bc77c1

Browse files
committed
Add RELEASE_CHECK_URL to configuration and default env.
1 parent 80f514f commit 8bc77c1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

configuration/configuration.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ def read_secret(secret_name):
170170
# When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to
171171
# prefer IPv4 instead.
172172
PREFER_IPV4 = os.environ.get('PREFER_IPV4', 'False').lower() == 'true'
173+
174+
# This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour.
175+
RELEASE_CHECK_TIMEOUT = os.environ.get('RELEASE_CHECK_TIMEOUT', 24 * 3600)
176+
177+
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
178+
# version check or use the URL below to check for release in the official NetBox repository.
179+
# https://api.github.com/repos/netbox-community/netbox/releases
180+
RELEASE_CHECK_URL = os.environ.get('RELEASE_CHECK_URL', None)
181+
173182
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of
174183
# this setting is derived from the installed location.
175184
REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports')

env/netbox.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ SUPERUSER_EMAIL=admin@example.com
3030
SUPERUSER_PASSWORD=admin
3131
SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
3232
WEBHOOKS_ENABLED=true
33+
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases

0 commit comments

Comments
 (0)