Added some change from DEV

- Pinned unit version to prevent suprises with configuration changes
- Added psql client for manage.py dbshell
- Set LANG to "C.UTF8" to correctly read configuration files
This commit is contained in:
Tobias Genannt 2021-11-25 11:01:04 +01:00
parent 7ec68ecccb
commit 543a365c58
3 changed files with 6 additions and 3 deletions

View File

@ -50,6 +50,7 @@ RUN . /etc/os-release \
ca-certificates \
curl \
openssl \
postgresql-client \
python3 \
python3-distutils \
&& curl -sL https://nginx.org/keys/nginx_signing.key | \
@ -59,8 +60,8 @@ RUN . /etc/os-release \
&& apt-get update -qq \
&& apt-get install \
--yes -qq --no-install-recommends \
unit \
unit-python3.9 \
unit=1.26.0-1~bullseye \
unit-python3.9=1.26.0-1~bullseye \
tini \
&& rm -rf /var/lib/apt/lists/*
@ -86,6 +87,7 @@ WORKDIR /opt/netbox
# Must set permissions for '/opt/netbox/netbox/media' directory
# to g+w so that pictures can be uploaded to netbox.
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
&& chown -R unit:root /opt/netbox/netbox/media /opt/unit/ \
&& chmod -R g+w /opt/netbox/netbox/media /opt/unit/ \
&& /opt/netbox/venv/bin/python -m mkdocs build \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \

View File

@ -11,7 +11,7 @@
"uri": "/static/*"
},
"action": {
"share": "/opt/netbox/netbox"
"share": "/opt/netbox/netbox${uri}"
}
},

1
env/netbox.env vendored
View File

@ -15,6 +15,7 @@ EMAIL_USERNAME=netbox
EMAIL_USE_SSL=false
EMAIL_USE_TLS=false
HOUSEKEEPING_INTERVAL=86400
LANG=C.UTF-8
MAX_PAGE_SIZE=1000
MEDIA_ROOT=/opt/netbox/netbox/media
METRICS_ENABLED=false