Compare commits

..

No commits in common. "b1394ff9cb1b96ec1cb0d9f6162a07bf8eff92ad" and "c49af09fa586b07ab72da19b9edf353a2f9cb54c" have entirely different histories.

8 changed files with 34 additions and 5 deletions

View File

@ -40,8 +40,6 @@ 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: .editorconfig-checker.json
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml

View File

@ -79,6 +79,7 @@ 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/

View File

@ -1 +1 @@
3.4.0
3.3.0

View File

@ -28,6 +28,15 @@ 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

View File

@ -1,6 +1,6 @@
services:
netbox: &netbox
image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0}
image: docker.io/netboxcommunity/netbox:${VERSION-v4.3-3.3.0}
depends_on:
- postgres
- redis
@ -31,6 +31,18 @@ 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:

8
docker/housekeeping.sh Executable file
View File

@ -0,0 +1,8 @@
#!/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
env/netbox.env vendored
View File

@ -15,6 +15,7 @@ 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

@ -3,4 +3,4 @@ dulwich==0.24.1
python3-saml==1.16.0
--no-binary lxml
--no-binary xmlsec
sentry-sdk[django]==2.35.2
sentry-sdk[django]==2.35.0