mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-05-10 08:14:37 +02:00
commit
477decd80a
@ -9,3 +9,6 @@ indent_size = 2
|
|||||||
|
|
||||||
[*.py]
|
[*.py]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[VERSION]
|
||||||
|
insert_final_newline = false
|
||||||
|
@ -2,17 +2,12 @@
|
|||||||
"Verbose": false,
|
"Verbose": false,
|
||||||
"Debug": false,
|
"Debug": false,
|
||||||
"IgnoreDefaults": false,
|
"IgnoreDefaults": false,
|
||||||
"SpacesAftertabs": false,
|
"SpacesAfterTabs": false,
|
||||||
"NoColor": false,
|
"NoColor": false,
|
||||||
"Exclude": [
|
"Exclude": ["LICENSE", "\\.initializers", "\\.vscode"],
|
||||||
"LICENSE",
|
|
||||||
"\\.initializers",
|
|
||||||
"\\.vscode"
|
|
||||||
],
|
|
||||||
"AllowedContentTypes": [],
|
"AllowedContentTypes": [],
|
||||||
"PassedFiles": [],
|
"PassedFiles": [],
|
||||||
"Disable": {
|
"Disable": {
|
||||||
// set these options to true to disable specific checks
|
|
||||||
"EndOfLine": false,
|
"EndOfLine": false,
|
||||||
"Indentation": false,
|
"Indentation": false,
|
||||||
"InsertFinalNewline": false,
|
"InsertFinalNewline": false,
|
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
VALIDATE_GITLEAKS: false
|
VALIDATE_GITLEAKS: false
|
||||||
VALIDATE_JSCPD: false
|
VALIDATE_JSCPD: false
|
||||||
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
|
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
|
||||||
EDITORCONFIG_FILE_NAME: .ecrc
|
EDITORCONFIG_FILE_NAME: .editorconfig-checker.json
|
||||||
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
|
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
|
||||||
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
|
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
|
||||||
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
|
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
|
||||||
|
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -13,11 +13,13 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_cmd:
|
build:
|
||||||
- ./build-latest.sh
|
- { "cmd": "./build-latest.sh", "branch": "release" }
|
||||||
- PRERELEASE=true ./build-latest.sh
|
- { "cmd": "./build.sh main", "branch": "release" }
|
||||||
- ./build.sh feature
|
# Build pre release images from our develop branch
|
||||||
- ./build.sh main
|
# 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:
|
platform:
|
||||||
- linux/amd64,linux/arm64
|
- linux/amd64,linux/arm64
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -31,15 +33,17 @@ jobs:
|
|||||||
- id: source-checkout
|
- id: source-checkout
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ matrix.build.branch }}
|
||||||
- id: set-netbox-docker-version
|
- id: set-netbox-docker-version
|
||||||
name: Get Version of NetBox Docker
|
name: Get Version of NetBox Docker
|
||||||
run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT"
|
run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: check-build-needed
|
- 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:
|
env:
|
||||||
CHECK_ONLY: "true"
|
CHECK_ONLY: "true"
|
||||||
run: ${{ matrix.build_cmd }}
|
run: ${{ matrix.build.cmd }}
|
||||||
# docker.io
|
# docker.io
|
||||||
- id: docker-io-login
|
- id: docker-io-login
|
||||||
name: Login to docker.io
|
name: Login to docker.io
|
||||||
@ -77,7 +81,7 @@ jobs:
|
|||||||
if: steps.check-build-needed.outputs.skipped != 'true'
|
if: steps.check-build-needed.outputs.skipped != 'true'
|
||||||
- id: build-and-push
|
- id: build-and-push
|
||||||
name: Push the image
|
name: Push the image
|
||||||
run: ${{ matrix.build_cmd }} --push
|
run: ${{ matrix.build.cmd }} --push
|
||||||
if: steps.check-build-needed.outputs.skipped != 'true'
|
if: steps.check-build-needed.outputs.skipped != 'true'
|
||||||
env:
|
env:
|
||||||
BUILDX_PLATFORM: ${{ matrix.platform }}
|
BUILDX_PLATFORM: ${{ matrix.platform }}
|
||||||
|
17
Dockerfile
17
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
ARG FROM
|
ARG FROM
|
||||||
FROM ${FROM} AS builder
|
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.7 /uv /usr/local/bin/
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update -qq \
|
&& apt-get update -qq \
|
||||||
&& apt-get upgrade \
|
&& apt-get upgrade \
|
||||||
@ -33,6 +33,8 @@ RUN \
|
|||||||
# we have potential version conflicts and the build will fail.
|
# we have potential version conflicts and the build will fail.
|
||||||
# That's why we just replace it in the original requirements.txt.
|
# 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 && \
|
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 \
|
/usr/local/bin/uv pip install \
|
||||||
-r /requirements.txt \
|
-r /requirements.txt \
|
||||||
-r /requirements-container.txt
|
-r /requirements-container.txt
|
||||||
@ -44,6 +46,8 @@ RUN \
|
|||||||
ARG FROM
|
ARG FROM
|
||||||
FROM ${FROM} AS main
|
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 \
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update -qq \
|
&& apt-get update -qq \
|
||||||
&& apt-get upgrade \
|
&& apt-get upgrade \
|
||||||
@ -60,15 +64,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
|||||||
openssl \
|
openssl \
|
||||||
python3 \
|
python3 \
|
||||||
tini \
|
tini \
|
||||||
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
|
unit-python3.12=1.34.2-1~noble \
|
||||||
https://unit.nginx.org/keys/nginx-keyring.gpg \
|
unit=1.34.2-1~noble \
|
||||||
&& 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 \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
|
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
|
||||||
|
@ -49,7 +49,7 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
redis: &redis
|
redis: &redis
|
||||||
image: docker.io/valkey/valkey:8.0-alpine
|
image: docker.io/valkey/valkey:8.1-alpine
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
image: docker.io/netboxcommunity/netbox:${VERSION-v4.2-3.2.1}
|
image: docker.io/netboxcommunity/netbox:${VERSION-v4.3-3.3.0}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
@ -59,7 +59,7 @@ services:
|
|||||||
|
|
||||||
# redis
|
# redis
|
||||||
redis:
|
redis:
|
||||||
image: docker.io/valkey/valkey:8.0-alpine
|
image: docker.io/valkey/valkey:8.1-alpine
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
||||||
@ -74,7 +74,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- netbox-redis-data:/data
|
- netbox-redis-data:/data
|
||||||
redis-cache:
|
redis-cache:
|
||||||
image: docker.io/valkey/valkey:8.0-alpine
|
image: docker.io/valkey/valkey:8.1-alpine
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
- -c # this is to evaluate the $REDIS_PASSWORD from the env
|
||||||
|
1
docker/unit.list
Normal file
1
docker/unit.list
Normal file
@ -0,0 +1 @@
|
|||||||
|
deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] http://packages.nginx.org/unit/ubuntu/ noble unit
|
@ -1,6 +1,5 @@
|
|||||||
django-auth-ldap==5.1.0
|
django-auth-ldap==5.1.0
|
||||||
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.6
|
dulwich==0.22.8
|
||||||
dulwich==0.22.7
|
|
||||||
python3-saml==1.16.0
|
python3-saml==1.16.0
|
||||||
--no-binary lxml
|
--no-binary lxml
|
||||||
--no-binary xmlsec
|
--no-binary xmlsec
|
||||||
|
@ -3,4 +3,10 @@ LOGGING = {
|
|||||||
'disable_existing_loggers': True
|
'disable_existing_loggers': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PLUGINS = [
|
||||||
|
'netbox.tests.dummy_plugin',
|
||||||
|
]
|
||||||
|
|
||||||
|
ALLOW_TOKEN_RETRIEVAL = True
|
||||||
|
|
||||||
DEFAULT_PERMISSIONS = {}
|
DEFAULT_PERMISSIONS = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user