mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-18 14:26:53 +00:00
Compare commits
4 commits
0af90a3c50
...
c474fe5b28
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c474fe5b28 | ||
|
|
e77efce5d4 | ||
|
|
c6d79fde21 | ||
|
|
a883a064f6 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -47,7 +47,7 @@ jobs:
|
|||
# docker.io
|
||||
- id: docker-io-login
|
||||
name: Login to docker.io
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.dockerhub_username }}
|
||||
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
# quay.io
|
||||
- id: quay-io-login
|
||||
name: Login to Quay.io
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.quayio_username }}
|
||||
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
# ghcr.io
|
||||
- id: ghcr-io-login
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ services:
|
|||
interval: 15s
|
||||
volumes:
|
||||
- ./configuration:/etc/netbox/config:z,ro
|
||||
- ./hooks:/opt/netbox/hooks:z,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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Runs on every start of the NetBox Docker container
|
||||
|
||||
# Stop when an error occures
|
||||
# Stop when an error occurs
|
||||
set -e
|
||||
|
||||
# Allows NetBox to be run as non-root users
|
||||
|
|
@ -58,6 +58,14 @@ else
|
|||
</opt/netbox/super_user.py
|
||||
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."
|
||||
|
||||
# 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