forked from mirror/netbox-docker
Compare commits
6 Commits
2.9.0
...
feat/ENT-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f362a9f85 | ||
|
|
1265d2277a | ||
|
|
620ca96d64 | ||
|
|
2561055265 | ||
|
|
53ac2ff81b | ||
|
|
b6492b2e6b |
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
image: docker.io/netboxcommunity/netbox:${VERSION-v4.0-2.9.0}
|
image: docker.io/netboxcommunity/netbox:${VERSION-v4.0-2.9.1}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
@@ -11,9 +11,10 @@ services:
|
|||||||
start_period: 60s
|
start_period: 60s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
interval: 15s
|
interval: 15s
|
||||||
test: "curl -f http://localhost:8080/api/ || exit 1"
|
test: "curl -f http://localhost:8080/login/ || exit 1"
|
||||||
volumes:
|
volumes:
|
||||||
- ./configuration:/etc/netbox/config:z,ro
|
- ./configuration:/etc/netbox/config:z,ro
|
||||||
|
- init-files:/opt/init:ro
|
||||||
- netbox-media-files:/opt/netbox/netbox/media:rw
|
- netbox-media-files:/opt/netbox/netbox/media:rw
|
||||||
- netbox-reports-files:/opt/netbox/netbox/reports:rw
|
- netbox-reports-files:/opt/netbox/netbox/reports:rw
|
||||||
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
|
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
|
||||||
@@ -72,6 +73,8 @@ services:
|
|||||||
- netbox-redis-cache-data:/data
|
- netbox-redis-cache-data:/data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
init-files:
|
||||||
|
driver: local
|
||||||
netbox-media-files:
|
netbox-media-files:
|
||||||
driver: local
|
driver: local
|
||||||
netbox-postgres-data:
|
netbox-postgres-data:
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Runs on every start of the NetBox Docker container
|
# Runs on every start of the NetBox Docker container
|
||||||
|
|
||||||
# Stop when an error occures
|
# Stop when an error occurs
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Allows NetBox to be run as non-root users
|
# Allows NetBox to be run as non-root users
|
||||||
umask 002
|
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
|
# Load correct Python3 env
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source /opt/netbox/venv/bin/activate
|
source /opt/netbox/venv/bin/activate
|
||||||
@@ -91,8 +98,15 @@ except Token.DoesNotExist:
|
|||||||
pass
|
pass
|
||||||
END
|
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."
|
echo "✅ Initialisation is done."
|
||||||
|
|
||||||
# Launch whatever is passed by docker
|
# Launch whatever is passed by docker
|
||||||
# (i.e. the RUN instruction in the Dockerfile)
|
# (i.e. the CMD instruction in the Dockerfile)
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ django-auth-ldap==4.8.0
|
|||||||
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.3
|
django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.3
|
||||||
dulwich==0.22.1
|
dulwich==0.22.1
|
||||||
python3-saml==1.16.0 --no-binary lxml
|
python3-saml==1.16.0 --no-binary lxml
|
||||||
sentry-sdk==2.1.1
|
sentry-sdk[django]==2.1.1
|
||||||
|
|||||||
Reference in New Issue
Block a user