Compare commits

...

117 Commits

Author SHA1 Message Date
Tobias Genannt
ae5f7d2419 Merge pull request #1524 from netbox-community/develop
Version 3.4.1
2025-09-26 11:04:31 +02:00
Tobias Genannt
a945236c81 Preparation for 3.4.1 2025-09-26 09:47:06 +02:00
Tobias Genannt
481a102d30 Merge pull request #1515 from alexanderhofstaetter/patch-1
Increase default NGINX Unit request body limit to 100 MB in nginx settings
2025-09-26 09:25:28 +02:00
Tobias Genannt
81fb62ecef Merge pull request #1519 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.39.0
2025-09-25 15:14:25 +02:00
renovate[bot]
2c49500e8d Update dependency sentry-sdk to v2.39.0 2025-09-25 12:49:11 +00:00
Tobias Genannt
c16c79ff16 Merge pull request #1517 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.38.0
2025-09-16 06:39:49 +02:00
renovate[bot]
c05e838edc Update dependency sentry-sdk to v2.38.0 2025-09-15 23:32:23 +00:00
Alexander Hofstätter
e62af8be76 Increase default NGINX Unit request body limit to 100 MB in docker/nginx-unit.json
The current NGINX Unit configuration in netbox-docker implicitly limits
incoming HTTP request bodies to roughly 2.5 MB. This causes file uploads
(custom scripts, attachments, etc.) to fail with HTTP 413 before they
reach Django, even when NetBox settings like FILE_UPLOAD_MAX_MEMORY_SIZE
are raised.

This change adds a settings block to docker/nginx-unit.json to raise
the default limit:

{
  "settings": {
    "http": {
      "max_body_size": 104857600
    }
  }
}

With this change, new deployments can handle uploads up to 100 MB out
of the box, aligning the container default with the capabilities of
NetBox core and preventing unexpected 413 errors.

Fixes: https://github.com/netbox-community/netbox-docker/issues/897
2025-09-13 13:06:29 +02:00
Tobias Genannt
a229603d90 Merge pull request #1513 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.37.1
2025-09-09 17:08:38 +02:00
renovate[bot]
942fc04776 Update dependency sentry-sdk to v2.37.1 2025-09-09 14:47:12 +00:00
Tobias Genannt
b76bd3d780 Merge pull request #1511 from LeoColomb/patch-1
Update `BUILD_DATE` format to include seconds
2025-09-08 08:12:34 +02:00
Léo Colombaro
4744eeb3ef Update BUILD_DATE format to include seconds
* Comply with all standards (RFC 3339, ISO 8601, and HTML).
* Reduce ambiguity.
* Ensure a fully compliant `org.opencontainers.image.created`. (fix artifacthub error)
2025-09-07 14:41:44 +02:00
Tobias Genannt
bdea0cf05a Merge pull request #1510 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.37.0
2025-09-05 15:21:12 +02:00
renovate[bot]
76f670faaa Update dependency sentry-sdk to v2.37.0 2025-09-05 12:59:40 +00:00
Tobias Genannt
263fcf35bf Merge pull request #1509 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.36.0
2025-09-04 12:17:06 +02:00
renovate[bot]
fb1cfd880a Update dependency sentry-sdk to v2.36.0 2025-09-04 09:54:49 +00:00
Tobias Genannt
b1394ff9cb Merge pull request #1508 from netbox-community/develop
Version 3.4.0
2025-09-04 09:59:09 +02:00
Tobias Genannt
e9a8e14aa8 Disable zizmor for now 2025-09-03 08:10:15 +02:00
Tobias Genannt
1b0da4048b Disable Trivy for now 2025-09-03 07:59:56 +02:00
Tobias Genannt
e61aba8388 Preparation for 3.4.0 2025-09-03 07:50:41 +02:00
Tobias Genannt
c4f90b7b34 Merge pull request #1507 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.35.2
2025-09-02 07:07:46 +02:00
renovate[bot]
8dac9f2dc7 Update dependency sentry-sdk to v2.35.2 2025-09-01 21:58:31 +00:00
Tobias Genannt
51947e4c52 Merge pull request #1506 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.35.1
2025-08-26 18:14:55 +02:00
renovate[bot]
af562671e2 Update dependency sentry-sdk to v2.35.1 2025-08-26 15:54:13 +00:00
Tobias Genannt
b97c177df8 Merge pull request #1501 from tobiasge/remove-housekeeping-container
Housekeeping
2025-08-18 10:49:53 +02:00
Tobias Genannt
67eff20f7d Housekeeping 2025-08-18 08:45:47 +02:00
Tobias Genannt
c49af09fa5 Merge pull request #1499 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.35.0
2025-08-15 06:49:39 +02:00
renovate[bot]
71ebfca443 Update dependency sentry-sdk to v2.35.0 2025-08-14 21:03:27 +00:00
Tobias Genannt
b882df6c73 Merge pull request #1497 from netbox-community/renovate/actions-checkout-5.x
Update actions/checkout action to v5
2025-08-11 17:50:23 +02:00
renovate[bot]
e9b6231d03 Update actions/checkout action to v5 2025-08-11 15:30:00 +00:00
Tobias Genannt
1d8a31be83 Merge pull request #1495 from CompPhy/database-syntax-fix
Support new DATABASES syntax in Netbox 4.3
2025-08-05 07:19:46 +02:00
Kelly Shutt
109ef8afd2 Update DATABASES syntax. 2025-08-04 13:10:06 -04:00
Tobias Genannt
b329ab9e61 Merge pull request #1493 from tobiasge/fix-feature-build
Fixed build for Netbox feature branch
2025-08-02 10:44:45 +02:00
Tobias Genannt
56e8af355e Fixed build for Netbox feature branch 2025-08-02 10:00:17 +02:00
Tobias Genannt
8c1a8a9ea6 Merge pull request #1492 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.24.1
2025-08-01 23:14:05 +02:00
renovate[bot]
68fd99c34a Update dependency dulwich to v0.24.1 2025-08-01 14:59:00 +00:00
Tobias Genannt
88b6fdb1bd Merge pull request #1491 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.24.0
2025-08-01 09:07:14 +02:00
renovate[bot]
f03200b88b Update dependency dulwich to v0.24.0 2025-08-01 06:47:14 +00:00
Tobias Genannt
cc314c6e03 Merge pull request #1490 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.34.1
2025-07-30 15:05:23 +02:00
renovate[bot]
7b10cf0933 Update dependency sentry-sdk to v2.34.1 2025-07-30 12:45:32 +00:00
Tobias Genannt
b15de21aca Merge pull request #1489 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.34.0
2025-07-30 07:17:42 +02:00
renovate[bot]
d1ef353b31 Update dependency sentry-sdk to v2.34.0 2025-07-29 18:12:22 +00:00
Tobias Genannt
900c8da9c6 Merge pull request #1487 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.33.2
2025-07-22 20:44:38 +02:00
renovate[bot]
e58c735825 Update dependency sentry-sdk to v2.33.2 2025-07-22 18:24:34 +00:00
Tobias Genannt
a2506df96a Merge pull request #1486 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.33.1
2025-07-21 22:12:45 +02:00
renovate[bot]
f9f5ae70f9 Update dependency sentry-sdk to v2.33.1 2025-07-21 19:45:47 +00:00
Tobias Genannt
dd57383091 Merge pull request #1485 from netbox-community/renovate/super-linter-super-linter-8.x
Update super-linter/super-linter action to v8
2025-07-18 18:22:45 +02:00
renovate[bot]
950b74e3e6 Update super-linter/super-linter action to v8 2025-07-18 15:59:13 +00:00
Tobias Genannt
9623807910 Merge pull request #1484 from netbox-community/renovate/ghcr.io-astral-sh-uv-0.x
Update ghcr.io/astral-sh/uv Docker tag to v0.8
2025-07-18 08:47:16 +02:00
renovate[bot]
658fc00a86 Update ghcr.io/astral-sh/uv Docker tag to v0.8 2025-07-17 23:45:53 +00:00
Tobias Genannt
bc74b0aa6a Merge pull request #1483 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.33.0
2025-07-15 18:55:23 +02:00
renovate[bot]
f69d214b9a Update dependency sentry-sdk to v2.33.0 2025-07-15 15:30:00 +00:00
Tobias Genannt
0e66fbad47 Merge pull request #1478 from dawnstrider/develop
Fixed typo for BUILDX_PLATFORM variable
2025-07-08 07:19:23 +02:00
dawnstrider
3320c5d82f Fixed typo for BUILDX_PLATFORM variable
The help prints the variable name as BUILDX_PLATFORMS whereas the code uses BUILDX_PLATFORM
2025-07-07 23:08:49 +02:00
Tobias Genannt
8a58c5a273 Merge pull request #1477 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.23.2
2025-07-07 16:04:16 +02:00
renovate[bot]
21232c8ce1 Update dependency dulwich to v0.23.2 2025-07-07 13:43:56 +00:00
Tobias Genannt
4966abc535 Merge pull request #1474 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.23.1
2025-07-01 06:57:37 +02:00
renovate[bot]
bc41310179 Update dependency dulwich to v0.23.1 2025-06-30 23:37:38 +00:00
Tobias Genannt
b7b226fd53 Merge pull request #1473 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.32.0
2025-06-27 10:57:35 +02:00
renovate[bot]
b845a0f45f Update dependency sentry-sdk to v2.32.0 2025-06-27 08:38:17 +00:00
Tobias Genannt
98feb59fb7 Merge pull request #1471 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.31.0
2025-06-24 21:49:05 +02:00
renovate[bot]
a0b6ce5ace Update dependency sentry-sdk to v2.31.0 2025-06-24 19:28:55 +00:00
Tobias Genannt
24f081ce9f Merge pull request #1470 from jensrudolf/jensrudolf-expose-ldap-always-update-user
Add AUTH_LDAP_ALWAY_UPDATE_USER to ldap config
2025-06-23 14:28:36 +02:00
Jens Rudolf
8e8e37fcc1 Add AUTH_LDAP_ALWAY_UPDATE_USER to ldap config
This change exposes the Django setting AUTH_LDAP_ALWAYS_UPDATE_USER as environment variable to simplify deployments with readonly databases and LDAP based authentication as no extra file is required to be mounted into the container anymore.
2025-06-23 13:08:00 +02:00
Tobias Genannt
17a5ddc232 Merge pull request #1469 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.23.0
2025-06-22 11:51:07 +02:00
renovate[bot]
0e7e68e153 Update dependency dulwich to v0.23.0 2025-06-21 20:48:00 +00:00
Tobias Genannt
4da0319f1f Merge pull request #1458 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.30.0
2025-06-21 10:15:50 +02:00
renovate[bot]
9748e5b9b7 Update dependency sentry-sdk to v2.30.0 2025-06-12 12:41:10 +00:00
Tobias Genannt
0456a39136 Merge pull request #1454 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.28.0
2025-05-12 15:15:34 +02:00
renovate[bot]
4a2b9be52c Update dependency sentry-sdk to v2.28.0 2025-05-12 12:54:48 +00:00
Tobias Genannt
e3f2401526 Merge pull request #1452 from netbox-community/renovate/django-auth-ldap-5.x
Update dependency django-auth-ldap to v5.2.0
2025-05-07 15:56:45 +02:00
renovate[bot]
945f61e684 Update dependency django-auth-ldap to v5.2.0 2025-05-07 13:36:43 +00:00
Tobias Genannt
477decd80a Merge pull request #1450 from netbox-community/develop
Version 3.3.0
2025-05-05 07:51:26 +02:00
Tobias Genannt
b845efe1ad Merge pull request #1449 from netbox-community/renovate/ghcr.io-astral-sh-uv-0.x
Update ghcr.io/astral-sh/uv Docker tag to v0.7
2025-05-04 15:52:39 +02:00
renovate[bot]
56defa3f82 Update ghcr.io/astral-sh/uv Docker tag to v0.7 2025-04-30 04:00:06 +00:00
Tobias Genannt
7078ab7519 Merge pull request #1448 from tobiasge/merge-back
Merge back of release into develop
2025-04-25 07:58:35 +02:00
Tobias Genannt
fcd5b4e66b Merge remote-tracking branch 'upstream/release' into merge-back 2025-04-25 07:28:42 +02:00
Tobias Genannt
83ec1c2656 Merge pull request #1446 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.27.0
2025-04-25 06:42:22 +02:00
renovate[bot]
0fe49f87d7 Update dependency sentry-sdk to v2.27.0 2025-04-24 15:15:00 +00:00
Tobias Genannt
83f87b4ad2 Merge pull request #1406 from netbox-community/renovate/docker.io-valkey-valkey-8.x
Update docker.io/valkey/valkey Docker tag to v8.1
2025-04-20 11:01:11 +02:00
Tobias Genannt
82d9d8ae49 Merge pull request #1438 from tobiasge/prepare-netbox-43
Prepare for NetBox 4.3
2025-04-20 10:50:32 +02:00
Tobias Genannt
f1864f8f20 Merge pull request #1439 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.26.1
2025-04-19 17:36:43 +02:00
Tobias Genannt
8431b77422 Use develop branch for pre-releases 2025-04-19 17:36:09 +02:00
renovate[bot]
19e167ec19 Update dependency sentry-sdk to v2.26.1 2025-04-15 11:46:55 +00:00
Tobias Genannt
8f7c21749e Match upstream testing configuration 2025-04-12 11:10:33 +02:00
Tobias Genannt
ec9a3e80da Prepare for NetBox 4.3 2025-04-12 10:26:09 +02:00
Tobias Genannt
61eaffaf2e Merge pull request #1432 from netbox-community/renovate/django-storages-1.x
Update dependency django-storages to v1.14.6
2025-04-02 20:10:56 +02:00
Tobias Genannt
fef49f447e Merge pull request #1435 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.25.1
2025-04-02 20:10:25 +02:00
renovate[bot]
5ded00b6fb Update dependency sentry-sdk to v2.25.1 2025-04-02 16:02:23 +00:00
renovate[bot]
67ddeb6735 Update dependency django-storages to v1.14.6 2025-04-02 06:32:03 +00:00
Tobias Genannt
8179a4344b Merge pull request #1431 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.25.0
2025-03-31 18:10:09 +02:00
renovate[bot]
688d8901b7 Update dependency sentry-sdk to v2.25.0 2025-03-31 15:49:55 +00:00
Tobias Genannt
687b8384bc Merge pull request #1418 from tobiasge/update-unit
Update Nginx Unit
2025-03-27 09:52:14 +01:00
Tobias Genannt
1c3017323c Merge pull request #1425 from skupjoe/fix-editorconfig-checker
Fix editorconfig-checker deprecations
2025-03-24 14:45:06 +01:00
skupjoe
c8bd177a93 Fix deprecated config name 2025-03-24 14:18:38 +01:00
Tobias Genannt
c31ed9a79a Merge pull request #1426 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.24.1
2025-03-24 14:09:28 +01:00
renovate[bot]
139c158d8a Update dependency sentry-sdk to v2.24.1 2025-03-24 12:37:10 +00:00
Tobias Genannt
e5400e345b Merge pull request #1423 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.24.0
2025-03-21 17:35:20 +01:00
renovate[bot]
017098a587 Update dependency sentry-sdk to v2.24.0 2025-03-21 16:10:17 +00:00
Tobias Genannt
bb8f2fd17c Merge pull request #1421 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.23.1
2025-03-17 20:17:20 +01:00
renovate[bot]
d9da3fa35b Update dependency sentry-sdk to v2.23.1 2025-03-17 18:07:11 +00:00
Tobias Genannt
0f7e72fc0d Merge pull request #1420 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.23.0
2025-03-17 13:12:44 +01:00
renovate[bot]
d9f72e94fa Update dependency sentry-sdk to v2.23.0 2025-03-17 11:43:58 +00:00
Tobias Genannt
1c8cdfa6dd Update Nginx Unit 2025-03-14 17:12:42 +01:00
Tobias Genannt
b6a30bf989 Merge pull request #1413 from netbox-community/renovate/dulwich-0.x
Update dependency dulwich to v0.22.8
2025-03-07 19:33:22 +01:00
Tobias Genannt
4eb0d6a368 Update test configuration 2025-03-06 21:29:33 +01:00
Tobias Genannt
849f8bef07 Make superliner happy 2025-03-06 20:56:29 +01:00
renovate[bot]
9eee74ba61 Update dependency dulwich to v0.22.8 2025-03-03 03:04:24 +00:00
renovate[bot]
34c26bbd30 Update docker.io/valkey/valkey Docker tag to v8.1 2025-02-17 22:53:25 +00:00
Tobias Genannt
caa3d3324f Merge pull request #1405 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.22.0
2025-02-17 18:26:38 +01:00
renovate[bot]
25b022203a Update dependency sentry-sdk to v2.22.0 2025-02-17 15:35:24 +00:00
Tobias Genannt
e61496688d Merge pull request #1400 from netbox-community/renovate/django-storages-1.x
Update dependency django-storages to v1.14.5
2025-02-15 20:13:33 +01:00
renovate[bot]
29bef7450a Update dependency django-storages to v1.14.5 2025-02-15 18:46:36 +00:00
Tobias Genannt
6edc921a79 Merge pull request #1399 from netbox-community/renovate/ghcr.io-astral-sh-uv-0.x
Update ghcr.io/astral-sh/uv Docker tag to v0.6
2025-02-14 20:17:22 +01:00
renovate[bot]
0f0ce521d6 Update ghcr.io/astral-sh/uv Docker tag to v0.6 2025-02-14 18:56:50 +00:00
Tobias Genannt
c3f119bedc Merge pull request #1396 from netbox-community/renovate/sentry-sdk-2.x
Update dependency sentry-sdk to v2.21.0
2025-02-12 12:54:22 +01:00
renovate[bot]
1701399b82 Update dependency sentry-sdk to v2.21.0 2025-02-12 11:35:22 +00:00
17 changed files with 73 additions and 87 deletions

View File

@@ -9,3 +9,6 @@ indent_size = 2
[*.py]
indent_size = 4
[VERSION]
insert_final_newline = false

View File

@@ -2,17 +2,12 @@
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"SpacesAfterTabs": false,
"NoColor": false,
"Exclude": [
"LICENSE",
"\\.initializers",
"\\.vscode"
],
"Exclude": ["LICENSE", "\\.initializers", "\\.vscode"],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
// set these options to true to disable specific checks
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,

View File

@@ -23,13 +23,13 @@ jobs:
packages: read
statuses: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: super-linter/super-linter@v7
uses: super-linter/super-linter@v8
env:
DEFAULT_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -40,8 +40,10 @@ jobs:
VALIDATE_DOCKERFILE: false
VALIDATE_GITLEAKS: false
VALIDATE_JSCPD: false
VALIDATE_TRIVY: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
EDITORCONFIG_FILE_NAME: .ecrc
EDITORCONFIG_FILE_NAME: .editorconfig-checker.json
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
@@ -70,7 +72,7 @@ jobs:
steps:
- id: git-checkout
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- id: buildx-setup
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

View File

@@ -13,11 +13,13 @@ jobs:
build:
strategy:
matrix:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build.sh feature
- ./build.sh main
build:
- { "cmd": "./build-latest.sh", "branch": "release" }
- { "cmd": "./build.sh main", "branch": "release" }
# Build pre release images from our develop branch
# This is used to test the latest changes before they are merged into the main branch
- { "cmd": "PRERELEASE=true ./build-latest.sh", "branch": "develop" }
- { "cmd": "./build.sh feature", "branch": "develop" }
platform:
- linux/amd64,linux/arm64
fail-fast: false
@@ -30,16 +32,18 @@ jobs:
steps:
- id: source-checkout
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ matrix.build.branch }}
- id: set-netbox-docker-version
name: Get Version of NetBox Docker
run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT"
shell: bash
- id: check-build-needed
name: Check if the build is needed for '${{ matrix.build_cmd }}'
name: Check if the build is needed for '${{ matrix.build.cmd }}'
env:
CHECK_ONLY: "true"
run: ${{ matrix.build_cmd }}
run: ${{ matrix.build.cmd }}
# docker.io
- id: docker-io-login
name: Login to docker.io
@@ -77,7 +81,7 @@ jobs:
if: steps.check-build-needed.outputs.skipped != 'true'
- id: build-and-push
name: Push the image
run: ${{ matrix.build_cmd }} --push
run: ${{ matrix.build.cmd }} --push
if: steps.check-build-needed.outputs.skipped != 'true'
env:
BUILDX_PLATFORM: ${{ matrix.platform }}

View File

@@ -1,7 +1,7 @@
ARG FROM
FROM ${FROM} AS builder
COPY --from=ghcr.io/astral-sh/uv:0.5 /uv /usr/local/bin/
COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /usr/local/bin/
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
&& apt-get upgrade \
@@ -33,6 +33,8 @@ RUN \
# we have potential version conflicts and the build will fail.
# That's why we just replace it in the original requirements.txt.
sed -i -e 's/social-auth-core/social-auth-core\[all\]/g' /requirements.txt && \
# The same is true for 'django-storages'
sed -i -e 's/django-storages/django-storages\[azure,boto3,dropbox,google,libcloud,sftp\]/g' /requirements.txt && \
/usr/local/bin/uv pip install \
-r /requirements.txt \
-r /requirements-container.txt
@@ -44,6 +46,8 @@ RUN \
ARG FROM
FROM ${FROM} AS main
COPY docker/unit.list /etc/apt/sources.list.d/unit.list
ADD --chmod=444 --chown=0:0 https://unit.nginx.org/keys/nginx-keyring.gpg /usr/share/keyrings/nginx-keyring.gpg
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
&& apt-get upgrade \
@@ -60,15 +64,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
openssl \
python3 \
tini \
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
https://unit.nginx.org/keys/nginx-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ noble unit" \
> /etc/apt/sources.list.d/unit.list \
&& apt-get update -qq \
&& apt-get install \
--yes -qq --no-install-recommends \
unit=1.34.1-1~noble \
unit-python3.12=1.34.1-1~noble \
unit-python3.12=1.34.2-1~noble \
unit=1.34.2-1~noble \
&& rm -rf /var/lib/apt/lists/*
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
@@ -82,7 +79,6 @@ COPY ${NETBOX_PATH} /opt/netbox
COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
COPY configuration/ /etc/netbox/config/
COPY docker/nginx-unit.json /etc/unit/
@@ -92,7 +88,7 @@ WORKDIR /opt/netbox/netbox
# Must set permissions for '/opt/netbox/netbox/media' directory
# to g+w so that pictures can be uploaded to netbox.
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
RUN mkdir -p static media /opt/unit/state/ /opt/unit/tmp/ \
&& chown -R unit:root /opt/unit/ media reports scripts \
&& chmod -R g+w /opt/unit/ media reports scripts \
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \

View File

@@ -1 +1 @@
3.2.1
3.4.1

View File

@@ -62,7 +62,7 @@ DOCKERFILE The name of Dockerfile to use.
DOCKER_FROM The base image to use.
${_GREEN}Default:${_CLEAR} 'ubuntu:24.04'
BUILDX_PLATFORMS
BUILDX_PLATFORM
Specifies the platform(s) to build the image for.
${_CYAN}Example:${_CLEAR} 'linux/amd64,linux/arm64'
${_GREEN}Default:${_CLEAR} 'linux/amd64'
@@ -223,7 +223,7 @@ fi
###
# Variables for labelling the docker image
###
BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M+00:00')"
BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%S+00:00')"
if [ -d ".git" ] && [ -z "${SKIP_GIT}" ]; then
GIT_REF="$(git rev-parse HEAD)"

View File

@@ -64,19 +64,21 @@ if '*' not in ALLOWED_HOSTS and 'localhost' not in ALLOWED_HOSTS:
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
DATABASE = {
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
'USER': environ.get('DB_USER', ''), # PostgreSQL username
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
# PostgreSQL password
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
# Database connection SSLMODE
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
# Max database connection age
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
# Disable the use of server-side cursors transaction pooling
DATABASES = {
'default': {
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
'USER': environ.get('DB_USER', ''), # PostgreSQL username
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
# PostgreSQL password
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
# Database connection SSLMODE
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
# Max database connection age
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
# Disable the use of server-side cursors transaction pooling
}
}
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate

View File

@@ -109,3 +109,6 @@ AUTH_LDAP_USER_ATTR_MAP = {
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
"email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mail')
}
# Update user object with the latest values from the LDAP directory every time the user logs in.
AUTH_LDAP_ALWAYS_UPDATE_USER = environ.get('AUTH_LDAP_ALWAYS_UPDATE_USER', 'True').lower() == 'true'

View File

@@ -28,15 +28,6 @@ services:
start_period: 40s
timeout: 3s
interval: 15s
netbox-housekeeping:
<<: *netbox
command:
- /opt/netbox/housekeeping.sh
healthcheck:
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
start_period: 40s
timeout: 3s
interval: 15s
postgres:
image: docker.io/postgres:17-alpine
@@ -49,7 +40,7 @@ services:
retries: 5
redis: &redis
image: docker.io/valkey/valkey:8.0-alpine
image: docker.io/valkey/valkey:8.1-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env

View File

@@ -1,6 +1,6 @@
services:
netbox: &netbox
image: docker.io/netboxcommunity/netbox:${VERSION-v4.2-3.2.1}
image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.1}
depends_on:
- postgres
- redis
@@ -31,18 +31,6 @@ services:
start_period: 20s
timeout: 3s
interval: 15s
netbox-housekeeping:
<<: *netbox
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/housekeeping.sh
healthcheck:
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
start_period: 20s
timeout: 3s
interval: 15s
# postgres
postgres:
@@ -59,7 +47,7 @@ services:
# redis
redis:
image: docker.io/valkey/valkey:8.0-alpine
image: docker.io/valkey/valkey:8.1-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
@@ -74,7 +62,7 @@ services:
volumes:
- netbox-redis-data:/data
redis-cache:
image: docker.io/valkey/valkey:8.0-alpine
image: docker.io/valkey/valkey:8.1-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env

View File

@@ -1,8 +0,0 @@
#!/bin/bash
SLEEP_SECONDS=${HOUSEKEEPING_INTERVAL:=86400}
echo "Interval set to ${SLEEP_SECONDS} seconds"
while true; do
date
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
sleep "${SLEEP_SECONDS}s"
done

View File

@@ -73,5 +73,10 @@
}
}
},
"access_log": "/dev/stdout"
"access_log": "/dev/stdout",
"settings": {
"http": {
"max_body_size": 104857600
}
}
}

1
docker/unit.list Normal file
View File

@@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] http://packages.nginx.org/unit/ubuntu/ noble unit

1
env/netbox.env vendored
View File

@@ -15,7 +15,6 @@ EMAIL_USERNAME=netbox
EMAIL_USE_SSL=false
EMAIL_USE_TLS=false
GRAPHQL_ENABLED=true
HOUSEKEEPING_INTERVAL=86400
MEDIA_ROOT=/opt/netbox/netbox/media
METRICS_ENABLED=false
REDIS_CACHE_DATABASE=1

View File

@@ -1,7 +1,6 @@
django-auth-ldap==5.1.0
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.6
dulwich==0.22.7
django-auth-ldap==5.2.0
dulwich==0.24.1
python3-saml==1.16.0
--no-binary lxml
--no-binary xmlsec
sentry-sdk[django]==2.27.0
sentry-sdk[django]==2.39.0

View File

@@ -3,4 +3,10 @@ LOGGING = {
'disable_existing_loggers': True
}
PLUGINS = [
'netbox.tests.dummy_plugin',
]
ALLOW_TOKEN_RETRIEVAL = True
DEFAULT_PERMISSIONS = {}