Build documentation files in the image

This commit is contained in:
Tobias Genannt 2021-07-21 09:58:27 +02:00
parent 9142aaf78e
commit 9d476fa9af
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,8 @@ WORKDIR /opt/netbox/netbox
# to g+w so that pictures can be uploaded to netbox.
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
&& chmod -R g+w media /opt/unit/ \
&& cd /opt/netbox/ && /opt/netbox/venv/bin/python -m mkdocs build \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
&& SECRET_KEY="dummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]