Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1394ff9cb | ||
|
|
e9a8e14aa8 | ||
|
|
1b0da4048b | ||
|
|
e61aba8388 | ||
|
|
c4f90b7b34 | ||
|
|
8dac9f2dc7 | ||
|
|
51947e4c52 | ||
|
|
af562671e2 | ||
|
|
b97c177df8 | ||
|
|
67eff20f7d | ||
|
|
c49af09fa5 | ||
|
|
71ebfca443 | ||
|
|
b882df6c73 | ||
|
|
e9b6231d03 | ||
|
|
1d8a31be83 | ||
|
|
109ef8afd2 | ||
|
|
b329ab9e61 | ||
|
|
56e8af355e | ||
|
|
8c1a8a9ea6 | ||
|
|
68fd99c34a | ||
|
|
88b6fdb1bd | ||
|
|
f03200b88b | ||
|
|
cc314c6e03 | ||
|
|
7b10cf0933 | ||
|
|
b15de21aca | ||
|
|
d1ef353b31 | ||
|
|
900c8da9c6 | ||
|
|
e58c735825 | ||
|
|
a2506df96a | ||
|
|
f9f5ae70f9 | ||
|
|
dd57383091 | ||
|
|
950b74e3e6 | ||
|
|
9623807910 | ||
|
|
658fc00a86 | ||
|
|
bc74b0aa6a | ||
|
|
f69d214b9a | ||
|
|
0e66fbad47 | ||
|
|
3320c5d82f | ||
|
|
8a58c5a273 | ||
|
|
21232c8ce1 | ||
|
|
4966abc535 | ||
|
|
bc41310179 | ||
|
|
b7b226fd53 | ||
|
|
b845a0f45f | ||
|
|
98feb59fb7 | ||
|
|
a0b6ce5ace | ||
|
|
24f081ce9f | ||
|
|
8e8e37fcc1 | ||
|
|
17a5ddc232 | ||
|
|
0e7e68e153 | ||
|
|
4da0319f1f | ||
|
|
9748e5b9b7 | ||
|
|
0456a39136 | ||
|
|
4a2b9be52c | ||
|
|
e3f2401526 | ||
|
|
945f61e684 | ||
|
|
477decd80a | ||
|
|
b845efe1ad | ||
|
|
56defa3f82 | ||
|
|
7078ab7519 | ||
|
|
fcd5b4e66b | ||
|
|
2efacf39ca | ||
|
|
a4ce13be19 | ||
|
|
fa08388175 | ||
|
|
fd9b41a5d1 | ||
|
|
83ec1c2656 | ||
|
|
0fe49f87d7 | ||
|
|
83f87b4ad2 | ||
|
|
82d9d8ae49 | ||
|
|
f1864f8f20 | ||
|
|
8431b77422 | ||
|
|
19e167ec19 | ||
|
|
8f7c21749e | ||
|
|
ec9a3e80da | ||
|
|
61eaffaf2e | ||
|
|
fef49f447e | ||
|
|
5ded00b6fb | ||
|
|
67ddeb6735 | ||
|
|
8179a4344b | ||
|
|
688d8901b7 | ||
|
|
687b8384bc | ||
|
|
1c3017323c | ||
|
|
c8bd177a93 | ||
|
|
c31ed9a79a | ||
|
|
139c158d8a | ||
|
|
e5400e345b | ||
|
|
017098a587 | ||
|
|
bb8f2fd17c | ||
|
|
d9da3fa35b | ||
|
|
0f7e72fc0d | ||
|
|
d9f72e94fa | ||
|
|
1c8cdfa6dd | ||
|
|
b6a30bf989 | ||
|
|
4eb0d6a368 | ||
|
|
849f8bef07 | ||
|
|
9eee74ba61 | ||
|
|
34c26bbd30 | ||
|
|
caa3d3324f | ||
|
|
25b022203a | ||
|
|
e61496688d | ||
|
|
29bef7450a | ||
|
|
6edc921a79 | ||
|
|
0f0ce521d6 | ||
|
|
c3f119bedc | ||
|
|
1701399b82 |
@@ -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,
|
||||||
10
.github/workflows/push.yml
vendored
10
.github/workflows/push.yml
vendored
@@ -23,13 +23,13 @@ jobs:
|
|||||||
packages: read
|
packages: read
|
||||||
statuses: write
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
# Full git history is needed to get a proper
|
# Full git history is needed to get a proper
|
||||||
# list of changed files within `super-linter`
|
# list of changed files within `super-linter`
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Lint Code Base
|
- name: Lint Code Base
|
||||||
uses: super-linter/super-linter@v7
|
uses: super-linter/super-linter@v8
|
||||||
env:
|
env:
|
||||||
DEFAULT_BRANCH: develop
|
DEFAULT_BRANCH: develop
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -40,8 +40,10 @@ jobs:
|
|||||||
VALIDATE_DOCKERFILE: false
|
VALIDATE_DOCKERFILE: false
|
||||||
VALIDATE_GITLEAKS: false
|
VALIDATE_GITLEAKS: false
|
||||||
VALIDATE_JSCPD: false
|
VALIDATE_JSCPD: false
|
||||||
|
VALIDATE_TRIVY: false
|
||||||
|
VALIDATE_GITHUB_ACTIONS_ZIZMOR: 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
|
||||||
@@ -70,7 +72,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- id: git-checkout
|
- id: git-checkout
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- 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@v3
|
||||||
|
|||||||
22
.github/workflows/release.yml
vendored
22
.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
|
||||||
@@ -30,16 +32,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- id: source-checkout
|
- id: source-checkout
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
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 }}
|
||||||
|
|||||||
20
Dockerfile
20
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.8 /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
|
||||||
@@ -82,7 +79,6 @@ COPY ${NETBOX_PATH} /opt/netbox
|
|||||||
COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
|
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/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
|
||||||
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
|
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 docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
|
||||||
COPY configuration/ /etc/netbox/config/
|
COPY configuration/ /etc/netbox/config/
|
||||||
COPY docker/nginx-unit.json /etc/unit/
|
COPY docker/nginx-unit.json /etc/unit/
|
||||||
@@ -92,7 +88,7 @@ WORKDIR /opt/netbox/netbox
|
|||||||
|
|
||||||
# Must set permissions for '/opt/netbox/netbox/media' directory
|
# Must set permissions for '/opt/netbox/netbox/media' directory
|
||||||
# to g+w so that pictures can be uploaded to netbox.
|
# 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 \
|
&& chown -R unit:root /opt/unit/ media reports scripts \
|
||||||
&& chmod -R g+w /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 \
|
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -62,7 +62,7 @@ DOCKERFILE The name of Dockerfile to use.
|
|||||||
DOCKER_FROM The base image to use.
|
DOCKER_FROM The base image to use.
|
||||||
${_GREEN}Default:${_CLEAR} 'ubuntu:24.04'
|
${_GREEN}Default:${_CLEAR} 'ubuntu:24.04'
|
||||||
|
|
||||||
BUILDX_PLATFORMS
|
BUILDX_PLATFORM
|
||||||
Specifies the platform(s) to build the image for.
|
Specifies the platform(s) to build the image for.
|
||||||
${_CYAN}Example:${_CLEAR} 'linux/amd64,linux/arm64'
|
${_CYAN}Example:${_CLEAR} 'linux/amd64,linux/arm64'
|
||||||
${_GREEN}Default:${_CLEAR} 'linux/amd64'
|
${_GREEN}Default:${_CLEAR} 'linux/amd64'
|
||||||
|
|||||||
@@ -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:
|
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
|
||||||
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
||||||
DATABASE = {
|
DATABASES = {
|
||||||
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
'default': {
|
||||||
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
||||||
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
||||||
# PostgreSQL password
|
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
||||||
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
|
# PostgreSQL password
|
||||||
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
|
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
|
||||||
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
|
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
|
||||||
# Database connection SSLMODE
|
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
|
||||||
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
|
# Database connection SSLMODE
|
||||||
# Max database connection age
|
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
|
||||||
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
|
# Max database connection age
|
||||||
# Disable the use of server-side cursors transaction pooling
|
'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
|
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate
|
||||||
|
|||||||
@@ -109,3 +109,6 @@ AUTH_LDAP_USER_ATTR_MAP = {
|
|||||||
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
|
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
|
||||||
"email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mail')
|
"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'
|
||||||
|
|||||||
@@ -28,15 +28,6 @@ services:
|
|||||||
start_period: 40s
|
start_period: 40s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
interval: 15s
|
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:
|
postgres:
|
||||||
image: docker.io/postgres:17-alpine
|
image: docker.io/postgres:17-alpine
|
||||||
@@ -49,7 +40,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.0}
|
image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
@@ -31,18 +31,6 @@ services:
|
|||||||
start_period: 20s
|
start_period: 20s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
interval: 15s
|
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
|
||||||
postgres:
|
postgres:
|
||||||
@@ -59,7 +47,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 +62,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,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
|
|
||||||
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
env/netbox.env
vendored
1
env/netbox.env
vendored
@@ -15,7 +15,6 @@ EMAIL_USERNAME=netbox
|
|||||||
EMAIL_USE_SSL=false
|
EMAIL_USE_SSL=false
|
||||||
EMAIL_USE_TLS=false
|
EMAIL_USE_TLS=false
|
||||||
GRAPHQL_ENABLED=true
|
GRAPHQL_ENABLED=true
|
||||||
HOUSEKEEPING_INTERVAL=86400
|
|
||||||
MEDIA_ROOT=/opt/netbox/netbox/media
|
MEDIA_ROOT=/opt/netbox/netbox/media
|
||||||
METRICS_ENABLED=false
|
METRICS_ENABLED=false
|
||||||
REDIS_CACHE_DATABASE=1
|
REDIS_CACHE_DATABASE=1
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
django-auth-ldap==5.1.0
|
django-auth-ldap==5.2.0
|
||||||
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4
|
dulwich==0.24.1
|
||||||
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
|
||||||
sentry-sdk[django]==2.20.0
|
sentry-sdk[django]==2.35.2
|
||||||
|
|||||||
@@ -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 = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user