Compare commits

..

2 Commits

Author SHA1 Message Date
Tobias Genannt
0c99ff8b56
Merge pull request #1225 from netbox-community/develop
Version 2.9.1
2024-05-07 18:29:09 +02:00
Tobias Genannt
6d25a54d49
Merge pull request #1219 from netbox-community/develop
Version 2.9.0
2024-05-06 21:26:10 +02:00
2 changed files with 2 additions and 19 deletions

View File

@ -14,7 +14,6 @@ services:
test: "curl -f http://localhost:8080/login/ || exit 1"
volumes:
- ./configuration:/etc/netbox/config:z,ro
- init-files:/opt/init:ro
- netbox-media-files:/opt/netbox/netbox/media:rw
- netbox-reports-files:/opt/netbox/netbox/reports:rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
@ -73,8 +72,6 @@ services:
- netbox-redis-cache-data:/data
volumes:
init-files:
driver: local
netbox-media-files:
driver: local
netbox-postgres-data:

View File

@ -1,19 +1,12 @@
#!/bin/bash
# Runs on every start of the NetBox Docker container
# Stop when an error occurs
# Stop when an error occures
set -e
# Allows NetBox to be run as non-root users
umask 002
if [ -d /opt/init/pre ]; then
find /opt/init/pre -type f -name \*.sh | sort -u | while read -r FILE; do
echo "⚙️ Running pre-init script '${FILE}'..."
/bin/bash -e "${FILE}" "$@"
done
fi
# Load correct Python3 env
# shellcheck disable=SC1091
source /opt/netbox/venv/bin/activate
@ -98,15 +91,8 @@ except Token.DoesNotExist:
pass
END
if [ -d /opt/init/post ]; then
find /opt/init/post -type f -name \*.sh | sort -u | while read -r FILE; do
echo "⚙️ Running post-init script '${FILE}'..."
/bin/bash -e "${FILE}" "$@"
done
fi
echo "✅ Initialisation is done."
# Launch whatever is passed by docker
# (i.e. the CMD instruction in the Dockerfile)
# (i.e. the RUN instruction in the Dockerfile)
exec "$@"