Skip to content

Commit 6d4f7c7

Browse files
authored
Merge pull request #47 from linuxserver/build-docs
2 parents 8e80316 + 3038988 commit 6d4f7c7

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ app_setup_block: |
5959
6060
# changelog
6161
changelogs:
62+
- { date: "14.05.23:", desc: "Build local docs on first run." }
6263
- { date: "05.03.23:", desc: "Rebase to Alpine 3.17." }
6364
- { date: "02.11.22:", desc: "Rebase to Alpine 3.16, migrate to s6v3." }
6465
- { date: "01.08.22:", desc: "Remove py3-pillow, add tiff to fix deps." }

root/defaults/uwsgi.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugin = python3
66
module = netbox.wsgi:application
77
static-map = /static=static
88
static-gzip-dir = static/CACHE
9+
static-index = index.html
910
hook-pre-app = exec:/usr/bin/python3 ./manage.py collectstatic --noinput
1011
hook-pre-app = exec:/usr/bin/python3 ./manage.py remove_stale_contenttypes --no-input
1112
hook-pre-app = exec:/usr/bin/python3 ./manage.py clearsessions

root/etc/s6-overlay/s6-rc.d/init-netbox-config/run

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ ln -sf /config/configuration.py /app/netbox/netbox/netbox/configuration.py
4949

5050
mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
5151

52+
# build docs
53+
if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
54+
cd /app/netbox || exit 1
55+
echo "Building local documentation"
56+
mkdocs build
57+
cd /app/netbox/netbox || exit 1
58+
fi
59+
5260
# permissions
5361
lsiown -R abc:abc \
5462
/app/netbox/netbox/static \

0 commit comments

Comments
 (0)