mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-18 22:36:57 +00:00
Compare commits
4 commits
c474fe5b28
...
ba15afdf5a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba15afdf5a | ||
|
|
c861c0bcc5 | ||
|
|
4ffeae5903 | ||
|
|
a883a064f6 |
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
|
|
@ -84,7 +84,7 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- 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@v4
|
||||||
- id: arm-install-skopeo
|
- id: arm-install-skopeo
|
||||||
name: Install 'skopeo' on ARM64
|
name: Install 'skopeo' on ARM64
|
||||||
if: matrix.os == 'ubuntu-24.04-arm'
|
if: matrix.os == 'ubuntu-24.04-arm'
|
||||||
|
|
|
||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -55,7 +55,7 @@ jobs:
|
||||||
if: steps.check-build-needed.outputs.skipped != 'true'
|
if: steps.check-build-needed.outputs.skipped != 'true'
|
||||||
- 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@v4
|
||||||
with:
|
with:
|
||||||
version: "lab:latest"
|
version: "lab:latest"
|
||||||
driver: cloud
|
driver: cloud
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ services:
|
||||||
interval: 15s
|
interval: 15s
|
||||||
volumes:
|
volumes:
|
||||||
- ./configuration:/etc/netbox/config:z,ro
|
- ./configuration:/etc/netbox/config:z,ro
|
||||||
|
- ./hooks:/opt/netbox/hooks:z,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
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/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
|
||||||
|
|
@ -58,6 +58,14 @@ else
|
||||||
</opt/netbox/super_user.py
|
</opt/netbox/super_user.py
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "⚙️ Applying user hooks"
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
for f in /opt/netbox/hooks/startup.d/*.py; do
|
||||||
|
./manage.py shell --no-startup --no-imports --interface python \
|
||||||
|
<"$f"
|
||||||
|
done
|
||||||
|
|
||||||
echo "✅ Initialisation is done."
|
echo "✅ Initialisation is done."
|
||||||
|
|
||||||
# Launch whatever is passed by docker
|
# Launch whatever is passed by docker
|
||||||
|
|
|
||||||
4
hooks/startup.d/README.md
Normal file
4
hooks/startup.d/README.md
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Startup scripts
|
||||||
|
|
||||||
|
Add python scripts here that should be executed during startup.
|
||||||
|
These can be used to provision groups or users for example.
|
||||||
Loading…
Reference in a new issue