mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-18 14:26:53 +00:00
Compare commits
13 commits
e8fd54bc5c
...
d74afdb374
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d74afdb374 | ||
|
|
e130d69c5b | ||
|
|
c861c0bcc5 | ||
|
|
4ffeae5903 | ||
|
|
e77efce5d4 | ||
|
|
c6d79fde21 | ||
|
|
2472368a0a | ||
|
|
c7bb6e2752 | ||
|
|
79c1832f62 | ||
|
|
9057d17fd9 | ||
|
|
18110eee00 | ||
|
|
f4f6189c9f | ||
|
|
9c992c9879 |
9
.github/workflows/push.yml
vendored
9
.github/workflows/push.yml
vendored
|
|
@ -19,8 +19,15 @@ jobs:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
name: Checks syntax of our code
|
name: Checks syntax of our code
|
||||||
permissions:
|
permissions:
|
||||||
|
# contents permission to clone the repository
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
# issues and pull-requests permissions to write results as pull
|
||||||
|
# request comments. Omit them if you don't need summary comments
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
# To report GitHub Actions status checks. Omit if you don't need
|
||||||
|
# to update commit status
|
||||||
statuses: write
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
@ -77,7 +84,7 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- id: buildx-setup
|
- id: buildx-setup
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v4
|
||||||
- id: arm-install-skopeo
|
- id: arm-install-skopeo
|
||||||
name: Install 'skopeo' on ARM64
|
name: Install 'skopeo' on ARM64
|
||||||
if: matrix.os == 'ubuntu-24.04-arm'
|
if: matrix.os == 'ubuntu-24.04-arm'
|
||||||
|
|
|
||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -47,7 +47,7 @@ jobs:
|
||||||
# docker.io
|
# docker.io
|
||||||
- id: docker-io-login
|
- id: docker-io-login
|
||||||
name: Login to docker.io
|
name: Login to docker.io
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
username: ${{ secrets.dockerhub_username }}
|
username: ${{ secrets.dockerhub_username }}
|
||||||
|
|
@ -55,7 +55,7 @@ jobs:
|
||||||
if: steps.check-build-needed.outputs.skipped != 'true'
|
if: steps.check-build-needed.outputs.skipped != 'true'
|
||||||
- id: buildx-setup
|
- id: buildx-setup
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v4
|
||||||
with:
|
with:
|
||||||
version: "lab:latest"
|
version: "lab:latest"
|
||||||
driver: cloud
|
driver: cloud
|
||||||
|
|
@ -64,7 +64,7 @@ jobs:
|
||||||
# quay.io
|
# quay.io
|
||||||
- id: quay-io-login
|
- id: quay-io-login
|
||||||
name: Login to Quay.io
|
name: Login to Quay.io
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
username: ${{ secrets.quayio_username }}
|
username: ${{ secrets.quayio_username }}
|
||||||
|
|
@ -73,7 +73,7 @@ jobs:
|
||||||
# ghcr.io
|
# ghcr.io
|
||||||
- id: ghcr-io-login
|
- id: ghcr-io-login
|
||||||
name: Login to GitHub Container Registry
|
name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ SOCIAL_AUTH_OIDC_OIDC_ENDPOINT = environ.get('SOCIAL_AUTH_OIDC_OIDC_ENDPOINT')
|
||||||
SOCIAL_AUTH_OIDC_KEY = environ.get('SOCIAL_AUTH_OIDC_KEY')
|
SOCIAL_AUTH_OIDC_KEY = environ.get('SOCIAL_AUTH_OIDC_KEY')
|
||||||
SOCIAL_AUTH_OIDC_SECRET = _read_secret('oidc_secret', environ.get('SOCIAL_AUTH_OIDC_SECRET', ''))
|
SOCIAL_AUTH_OIDC_SECRET = _read_secret('oidc_secret', environ.get('SOCIAL_AUTH_OIDC_SECRET', ''))
|
||||||
SOCIAL_AUTH_OIDC_SCOPE = _environ_get_and_map('SOCIAL_AUTH_OIDC_SCOPE', '', _AS_LIST)
|
SOCIAL_AUTH_OIDC_SCOPE = _environ_get_and_map('SOCIAL_AUTH_OIDC_SCOPE', '', _AS_LIST)
|
||||||
LOGOUT_REDIRECT_URL = environ.get('LOGOUT_REDIRECT_URL')
|
LOGOUT_REDIRECT_URL = environ.get('LOGOUT_REDIRECT_URL','/')
|
||||||
SOCIAL_AUTH_OIDC_JWT_ALGORITHMS = _environ_get_and_map('SOCIAL_AUTH_OIDC_JWT_ALGORITHMS', "RS256", _AS_LIST)
|
SOCIAL_AUTH_OIDC_JWT_ALGORITHMS = _environ_get_and_map('SOCIAL_AUTH_OIDC_JWT_ALGORITHMS', "RS256", _AS_LIST)
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
image: docker.io/netboxcommunity/netbox:${VERSION-v4.5-4.0.1}
|
image: docker.io/netboxcommunity/netbox:${VERSION-v4.5-4.0.2}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,15 @@ def _read_secret(secret_name: str, default: str | None = None) -> str | None:
|
||||||
su_name = environ.get("SUPERUSER_NAME", "admin")
|
su_name = environ.get("SUPERUSER_NAME", "admin")
|
||||||
su_email = environ.get("SUPERUSER_EMAIL", "admin@example.com")
|
su_email = environ.get("SUPERUSER_EMAIL", "admin@example.com")
|
||||||
su_password = _read_secret("superuser_password", environ.get("SUPERUSER_PASSWORD", "admin"))
|
su_password = _read_secret("superuser_password", environ.get("SUPERUSER_PASSWORD", "admin"))
|
||||||
# Sets the superuser API Token, defaults to widely known default
|
|
||||||
if not environ.get("SUPERUSER_API_TOKEN"):
|
if not environ.get("SUPERUSER_API_TOKEN"):
|
||||||
print("⚠️ Warning: Defaulting to the old default admin token in your database. This token is widely known; please remove it.")
|
print("⚠️ Warning: Defaulting to the old default admin token. This token is widely known; please remove it.")
|
||||||
su_api_token = _read_secret(
|
su_api_token = _read_secret(
|
||||||
"superuser_api_token",
|
"superuser_api_token",
|
||||||
environ.get("SUPERUSER_API_TOKEN", "0123456789abcdef0123456789abcdef01234567"),
|
environ.get("SUPERUSER_API_TOKEN", "0123456789abcdef0123456789abcdef01234567"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Sets the superuser API key, defaults to a randomly generated key.
|
|
||||||
su_api_key = _read_secret(
|
su_api_key = _read_secret(
|
||||||
"superuser_api_key",
|
"superuser_api_key",
|
||||||
environ.get("SUPERUSER_API_KEY"),
|
environ.get("SUPERUSER_API_KEY", "cae3ju9jeaqu"),
|
||||||
)
|
)
|
||||||
|
|
||||||
if not User.objects.filter(username=su_name):
|
if not User.objects.filter(username=su_name):
|
||||||
|
|
@ -44,5 +41,5 @@ if not User.objects.filter(username=su_name):
|
||||||
t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2, key=su_api_key)
|
t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2, key=su_api_key)
|
||||||
else:
|
else:
|
||||||
t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2)
|
t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2)
|
||||||
msg = f"💡 Superuser Username: {su_name}, E-Mail: {su_email}, API Token: {su_api_token} (use with '{t.get_auth_header_prefix()}<Your token>')"
|
msg = f"💡 Superuser Username: {su_name}, E-Mail: {su_email}, API Token: use with '{t.get_auth_header_prefix()}<Your token>'"
|
||||||
print(msg)
|
print(msg)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
django-auth-ldap==5.3.0
|
django-auth-ldap==5.3.0
|
||||||
dulwich==1.1.0
|
dulwich==1.1.0
|
||||||
granian[uvloop]==2.7.1
|
granian[uvloop]==2.7.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.53.0
|
sentry-sdk[django]==2.54.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue