Compare commits

...

12 commits

Author SHA1 Message Date
Skye Fugate b51be3f075
Merge 39d2b726af into 993628d8f0 2025-09-30 13:45:42 +02:00
Tobias Genannt 993628d8f0
Merge pull request #1525 from netbox-community/renovate/dulwich-0.x
Some checks failed
push / Checks syntax of our code (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Has been cancelled
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Has been cancelled
Update dependency dulwich to v0.24.2
2025-09-26 13:04:17 +02:00
renovate[bot] dbc1b37cf7
Update dependency dulwich to v0.24.2 2025-09-26 10:42:24 +00:00
Tobias Genannt 7aeec92141
Merge pull request #1479 from tobiasge/update-readme
Use our example file in the Readme
2025-09-26 12:41:55 +02:00
Tobias Genannt a945236c81 Preparation for 3.4.1
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
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
Some checks are pending
push / Checks syntax of our code (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh feature, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (./build.sh main, ubuntu-24.04-arm) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04) (push) Waiting to run
push / Builds new NetBox Docker Images (PRERELEASE=true ./build-latest.sh, ubuntu-24.04-arm) (push) Waiting to run
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
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 c8d766a95b Use our example file in the Readme 2025-07-08 07:45:38 +02:00
Skye A. Fugate 39d2b726af Secrets example 2025-07-03 13:18:34 -05:00
Skye A. Fugate eaad696666 feat: add SSO environment variable support for OKTA and Google OAuth2
Add native support for SSO configuration through environment variables
and Docker secrets, eliminating the need to modify configuration.py
for common SSO providers.

Changes:
- Add OKTA OpenID Connect configuration variables:
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY (env var)
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET (env var + Docker secret: okta_openidconnect_secret)
  - SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL (env var)

- Add Google OAuth2 configuration variables:
  - SOCIAL_AUTH_GOOGLE_OAUTH2_KEY (env var)
  - SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET (env var + Docker secret: google_oauth2_secret)

Follows existing patterns with _read_secret() for sensitive data and
environ.get() for non-sensitive configuration.

Resolves: netbox-community/netbox-docker#1139
2025-07-03 13:12:52 -05:00
8 changed files with 40 additions and 11 deletions

View file

@ -39,12 +39,9 @@ There is a more complete [_Getting Started_ guide on our wiki][wiki-getting-star
```bash ```bash
git clone -b release https://github.com/netbox-community/netbox-docker.git git clone -b release https://github.com/netbox-community/netbox-docker.git
cd netbox-docker cd netbox-docker
tee docker-compose.override.yml <<EOF # Copy the example override file
services: cp docker-compose.override.yml.example docker-compose.override.yml
netbox: # Read and edit the file to your liking
ports:
- 8000:8080
EOF
docker compose pull docker compose pull
docker compose up docker compose up
``` ```

View file

@ -1 +1 @@
3.4.0 3.4.1

View file

@ -305,6 +305,12 @@ REMOTE_AUTH_SUPERUSER_GROUPS = _environ_get_and_map('REMOTE_AUTH_SUPERUSER_GROUP
REMOTE_AUTH_SUPERUSERS = _environ_get_and_map('REMOTE_AUTH_SUPERUSERS', '', _AS_LIST) REMOTE_AUTH_SUPERUSERS = _environ_get_and_map('REMOTE_AUTH_SUPERUSERS', '', _AS_LIST)
REMOTE_AUTH_STAFF_GROUPS = _environ_get_and_map('REMOTE_AUTH_STAFF_GROUPS', '', _AS_LIST) REMOTE_AUTH_STAFF_GROUPS = _environ_get_and_map('REMOTE_AUTH_STAFF_GROUPS', '', _AS_LIST)
REMOTE_AUTH_STAFF_USERS = _environ_get_and_map('REMOTE_AUTH_STAFF_USERS', '', _AS_LIST) REMOTE_AUTH_STAFF_USERS = _environ_get_and_map('REMOTE_AUTH_STAFF_USERS', '', _AS_LIST)
# SSO Configuration
SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY')
SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET = _read_secret('okta_openidconnect_secret', environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET', ''))
SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL')
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = _read_secret('google_oauth2_secret', environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET', ''))
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the # This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
# version check or use the URL below to check for release in the official NetBox repository. # version check or use the URL below to check for release in the official NetBox repository.

View file

@ -19,4 +19,17 @@ services:
# SUPERUSER_EMAIL: "" # SUPERUSER_EMAIL: ""
# SUPERUSER_NAME: "" # SUPERUSER_NAME: ""
# SUPERUSER_PASSWORD: "" # SUPERUSER_PASSWORD: ""
# SSO Configuration
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY: "your_okta_client_id"
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL: "https://your-domain.okta.com"
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY: "your_google_client_id"
# secrets:
# - okta_openidconnect_secret
# - google_oauth2_secret
# Uncomment to use Docker secrets for SSO credentials
# secrets:
# okta_openidconnect_secret:
# file: ./secrets/okta_secret.txt
# google_oauth2_secret:
# file: ./secrets/google_secret.txt

View file

@ -1,6 +1,6 @@
services: services:
netbox: &netbox netbox: &netbox
image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0} image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.1}
depends_on: depends_on:
- postgres - postgres
- redis - redis

View file

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

8
env/netbox.env vendored
View file

@ -30,4 +30,12 @@ REDIS_SSL=false
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X' SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
SKIP_SUPERUSER=true SKIP_SUPERUSER=true
# SSO Configuration (uncomment and configure as needed)
# OKTA OpenID Connect
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY=your_okta_client_id
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET=your_okta_client_secret
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL=https://your-domain.okta.com
# Google OAuth2
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=your_google_client_id
# SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=your_google_client_secret
WEBHOOKS_ENABLED=true WEBHOOKS_ENABLED=true

View file

@ -1,6 +1,6 @@
django-auth-ldap==5.2.0 django-auth-ldap==5.2.0
dulwich==0.24.1 dulwich==0.24.2
python3-saml==1.16.0 python3-saml==1.16.0
--no-binary lxml --no-binary lxml
--no-binary xmlsec --no-binary xmlsec
sentry-sdk[django]==2.38.0 sentry-sdk[django]==2.39.0