This commit is contained in:
Per von Zweigbergk 2023-08-16 08:06:18 +02:00
commit d9e939eada
7 changed files with 19 additions and 17 deletions

3
.gitignore vendored
View File

@ -1,6 +1,6 @@
*.sql.gz *.sql.gz
.netbox .netbox
.initializers .python-version
docker-compose.override.yml docker-compose.override.yml
*.pem *.pem
configuration/* configuration/*
@ -11,6 +11,5 @@ configuration/ldap/*
!configuration/ldap/ldap_config.py !configuration/ldap/ldap_config.py
!configuration/logging.py !configuration/logging.py
!configuration/plugins.py.example !configuration/plugins.py.example
prometheus.yml
super-linter.log super-linter.log
plugin_requirements.txt plugin_requirements.txt

View File

@ -66,15 +66,15 @@ RUN export DEBIAN_FRONTEND=noninteractive \
python3 \ python3 \
python3-distutils \ python3-distutils \
tini \ tini \
&& curl -sL https://nginx.org/keys/nginx_signing.key \ && curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
> /etc/apt/trusted.gpg.d/nginx.asc && \ https://unit.nginx.org/keys/nginx-keyring.gpg \
echo "deb https://packages.nginx.org/unit/ubuntu/ jammy unit" \ && echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ lunar unit" \
> /etc/apt/sources.list.d/unit.list \ > /etc/apt/sources.list.d/unit.list \
&& apt-get update -qq \ && apt-get update -qq \
&& apt-get install \ && apt-get install \
--yes -qq --no-install-recommends \ --yes -qq --no-install-recommends \
unit=1.29.1-1~jammy \ unit=1.30.0-1~lunar \
unit-python3.10=1.29.1-1~jammy \ unit-python3.11=1.30.0-1~lunar \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/netbox/venv /opt/netbox/venv COPY --from=builder /opt/netbox/venv /opt/netbox/venv

View File

@ -61,7 +61,7 @@ DOCKERFILE The name of Dockerfile to use.
${_GREEN}Default:${_CLEAR} Dockerfile ${_GREEN}Default:${_CLEAR} Dockerfile
DOCKER_FROM The base image to use. DOCKER_FROM The base image to use.
${_GREEN}Default:${_CLEAR} 'ubuntu:22.04' ${_GREEN}Default:${_CLEAR} 'ubuntu:23.04'
BUILDX_PLATFORMS BUILDX_PLATFORMS
Specifies the platform(s) to build the image for. Specifies the platform(s) to build the image for.
@ -219,7 +219,7 @@ fi
# Determining the value for DOCKER_FROM # Determining the value for DOCKER_FROM
### ###
if [ -z "$DOCKER_FROM" ]; then if [ -z "$DOCKER_FROM" ]; then
DOCKER_FROM="docker.io/ubuntu:22.04" DOCKER_FROM="docker.io/ubuntu:23.04"
fi fi
### ###

View File

@ -141,8 +141,11 @@ if 'CHANGELOG_RETENTION' in environ:
CHANGELOG_RETENTION = _environ_get_and_map('CHANGELOG_RETENTION', None, _AS_INT) CHANGELOG_RETENTION = _environ_get_and_map('CHANGELOG_RETENTION', None, _AS_INT)
# Maximum number of days to retain job results (scripts and reports). Set to 0 to retain job results in the database indefinitely. (Default: 90) # Maximum number of days to retain job results (scripts and reports). Set to 0 to retain job results in the database indefinitely. (Default: 90)
if 'JOBRESULT_RETENTION' in environ: if 'JOB_RETENTION' in environ:
JOBRESULT_RETENTION = _environ_get_and_map('JOBRESULT_RETENTION', None, _AS_INT) JOB_RETENTION = _environ_get_and_map('JOB_RETENTION', None, _AS_INT)
# JOBRESULT_RETENTION was renamed to JOB_RETENTION in the v3.5.0 release of NetBox. For backwards compatibility, map JOBRESULT_RETENTION to JOB_RETENTION
elif 'JOBRESULT_RETENTION' in environ:
JOB_RETENTION = _environ_get_and_map('JOBRESULT_RETENTION', None, _AS_INT)
# API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be # API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be
# allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or # allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or

View File

@ -15,9 +15,9 @@ services:
test: "curl -f http://localhost:8080/api/ || exit 1" test: "curl -f http://localhost:8080/api/ || exit 1"
volumes: volumes:
- ./configuration:/etc/netbox/config:z,ro - ./configuration:/etc/netbox/config:z,ro
- netbox-media-files:/opt/netbox/netbox/media:z,rw - netbox-media-files:/opt/netbox/netbox/media:rw
- netbox-reports-files:/opt/netbox/netbox/reports:z,rw - netbox-reports-files:/opt/netbox/netbox/reports:rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:z,rw - netbox-scripts-files:/opt/netbox/netbox/scripts:rw
netbox-worker: netbox-worker:
<<: *netbox <<: *netbox
depends_on: depends_on:

View File

@ -51,7 +51,7 @@ exec unitd \
--control unix:$UNIT_SOCKET \ --control unix:$UNIT_SOCKET \
--pid /opt/unit/unit.pid \ --pid /opt/unit/unit.pid \
--log /dev/stdout \ --log /dev/stdout \
--state /opt/unit/state/ \ --statedir /opt/unit/state/ \
--tmp /opt/unit/tmp/ \ --tmpdir /opt/unit/tmp/ \
--user unit \ --user unit \
--group root --group root

View File

@ -1,4 +1,4 @@
django-auth-ldap==4.3.0 django-auth-ldap==4.5.0
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.13.2 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.13.2
psycopg2==2.9.6 psycopg2==2.9.6
python3-saml==1.15.0 python3-saml==1.15.0