mirror of
https://github.com/linuxserver/docker-netbox.git
synced 2026-02-20 08:40:10 +08:00
Build local docs
This commit is contained in:
parent
8e803163b0
commit
30389889b6
@ -59,6 +59,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "14.05.23:", desc: "Build local docs on first run." }
|
||||
- { date: "05.03.23:", desc: "Rebase to Alpine 3.17." }
|
||||
- { date: "02.11.22:", desc: "Rebase to Alpine 3.16, migrate to s6v3." }
|
||||
- { date: "01.08.22:", desc: "Remove py3-pillow, add tiff to fix deps." }
|
||||
|
||||
@ -6,6 +6,7 @@ plugin = python3
|
||||
module = netbox.wsgi:application
|
||||
static-map = /static=static
|
||||
static-gzip-dir = static/CACHE
|
||||
static-index = index.html
|
||||
hook-pre-app = exec:/usr/bin/python3 ./manage.py collectstatic --noinput
|
||||
hook-pre-app = exec:/usr/bin/python3 ./manage.py remove_stale_contenttypes --no-input
|
||||
hook-pre-app = exec:/usr/bin/python3 ./manage.py clearsessions
|
||||
|
||||
@ -49,6 +49,14 @@ ln -sf /config/configuration.py /app/netbox/netbox/netbox/configuration.py
|
||||
|
||||
mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
|
||||
|
||||
# build docs
|
||||
if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
|
||||
cd /app/netbox || exit 1
|
||||
echo "Building local documentation"
|
||||
mkdocs build
|
||||
cd /app/netbox/netbox || exit 1
|
||||
fi
|
||||
|
||||
# permissions
|
||||
lsiown -R abc:abc \
|
||||
/app/netbox/netbox/static \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user