mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-18 22:36:57 +00:00
Compare commits
5 commits
2336ed72b4
...
0af90a3c50
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0af90a3c50 | ||
|
|
2472368a0a | ||
|
|
c7bb6e2752 | ||
|
|
79c1832f62 | ||
|
|
a883a064f6 |
7
.github/workflows/push.yml
vendored
7
.github/workflows/push.yml
vendored
|
|
@ -19,8 +19,15 @@ jobs:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
name: Checks syntax of our code
|
name: Checks syntax of our code
|
||||||
permissions:
|
permissions:
|
||||||
|
# contents permission to clone the repository
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
# issues and pull-requests permissions to write results as pull
|
||||||
|
# request comments. Omit them if you don't need summary comments
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
# To report GitHub Actions status checks. Omit if you don't need
|
||||||
|
# to update commit status
|
||||||
statuses: write
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
image: docker.io/netboxcommunity/netbox:${VERSION-v4.5-4.0.1}
|
image: docker.io/netboxcommunity/netbox:${VERSION-v4.5-4.0.2}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -4,4 +4,4 @@ granian[uvloop]==2.7.2
|
||||||
python3-saml==1.16.0
|
python3-saml==1.16.0
|
||||||
--no-binary lxml
|
--no-binary lxml
|
||||||
--no-binary xmlsec
|
--no-binary xmlsec
|
||||||
sentry-sdk[django]==2.53.0
|
sentry-sdk[django]==2.54.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue