created preentry script to help with local development
This commit is contained in:
parent
919d139b6b
commit
4ef67d6071
4 changed files with 22 additions and 0 deletions
|
@ -70,6 +70,7 @@ COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
|
||||||
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
|
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
|
||||||
COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
|
COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
|
||||||
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
|
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
|
||||||
|
COPY docker/preentry.sh /opt/netbox/preentry.sh
|
||||||
COPY startup_scripts/ /opt/netbox/startup_scripts/
|
COPY startup_scripts/ /opt/netbox/startup_scripts/
|
||||||
COPY initializers/ /opt/netbox/initializers/
|
COPY initializers/ /opt/netbox/initializers/
|
||||||
COPY configuration/ /etc/netbox/config/
|
COPY configuration/ /etc/netbox/config/
|
||||||
|
|
|
@ -16,12 +16,14 @@ services:
|
||||||
- ./reports:/etc/netbox/reports:z,ro
|
- ./reports:/etc/netbox/reports:z,ro
|
||||||
- ./scripts:/etc/netbox/scripts:z,ro
|
- ./scripts:/etc/netbox/scripts:z,ro
|
||||||
- netbox-media-files:/opt/netbox/netbox/media:z
|
- netbox-media-files:/opt/netbox/netbox/media:z
|
||||||
|
# - ./custom_preentry.sh:/opt/netbox/preentry.sh
|
||||||
netbox-worker:
|
netbox-worker:
|
||||||
<<: *netbox
|
<<: *netbox
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- postgres
|
- postgres
|
||||||
command:
|
command:
|
||||||
|
- /opt/netbox/preentry.sh
|
||||||
- /opt/netbox/venv/bin/python
|
- /opt/netbox/venv/bin/python
|
||||||
- /opt/netbox/netbox/manage.py
|
- /opt/netbox/netbox/manage.py
|
||||||
- rqworker
|
- rqworker
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# run preentry script to install any local depencencies / file mods
|
||||||
|
/opt/netbox/preentry.sh
|
||||||
|
|
||||||
SECONDS=${HOUSEKEEPING_INTERVAL:=86400}
|
SECONDS=${HOUSEKEEPING_INTERVAL:=86400}
|
||||||
echo "Interval set to ${SECONDS} seconds"
|
echo "Interval set to ${SECONDS} seconds"
|
||||||
while true; do
|
while true; do
|
||||||
|
|
16
docker/preentry.sh
Normal file
16
docker/preentry.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Example of how to activate a development plugin
|
||||||
|
|
||||||
|
# echo -e "installing custom plugin"
|
||||||
|
# source /opt/netbox/venv/bin/activate
|
||||||
|
# cd /opt/plugin_source
|
||||||
|
# python3 setup.py develop
|
||||||
|
# echo -e "finished installing custom plugin"
|
||||||
|
|
||||||
|
|
||||||
|
# follow on scripts expect this to be the current dir.
|
||||||
|
# uncomment if you have changed directory
|
||||||
|
# cd /opt/netbox/netbox
|
||||||
|
exec "$@"
|
Loading…
Add table
Add a link
Reference in a new issue