mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-07 08:34:00 +01:00
Updated to new unit version
This commit is contained in:
parent
879c700bb8
commit
d3a30e1172
@ -66,8 +66,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install \
|
||||
--yes -qq --no-install-recommends \
|
||||
unit=1.27.0-1~jammy \
|
||||
unit-python3.10=1.27.0-1~jammy \
|
||||
unit=1.29.1-1~jammy \
|
||||
unit-python3.10=1.29.1-1~jammy \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /opt/netbox/venv /opt/netbox/venv
|
||||
@ -94,7 +94,7 @@ RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
|
||||
--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
|
||||
|
||||
ENV LANG=C.UTF-8 PATH=/opt/netbox/venv/bin:$PATH
|
||||
ENV LANG=C.utf8 PATH=/opt/netbox/venv/bin:$PATH
|
||||
ENTRYPOINT [ "/usr/bin/tini", "--" ]
|
||||
|
||||
CMD [ "/opt/netbox/docker-entrypoint.sh", "/opt/netbox/launch-netbox.sh" ]
|
||||
|
2
build.sh
2
build.sh
@ -332,7 +332,7 @@ elif [[ "${IMAGE_NAME_TAGS[0]}" = docker.io* ]]; then
|
||||
|
||||
if ! printf '%s\n' "${IMAGES_LAYERS_OLD[@]}" | grep -q -P "^${BASE_LAST_LAYER}\$"; then
|
||||
SHOULD_BUILD="true"
|
||||
BUILD_REASON="${BUILD_REASON} debian"
|
||||
BUILD_REASON="${BUILD_REASON} ubuntu"
|
||||
fi
|
||||
if [ "${NETBOX_GIT_REF}" != "${NETBOX_GIT_REF_OLD}" ]; then
|
||||
SHOULD_BUILD="true"
|
||||
|
@ -2,7 +2,10 @@ version: '3.4'
|
||||
services:
|
||||
netbox:
|
||||
ports:
|
||||
- 8000:8080
|
||||
- "8000:8080"
|
||||
# If you want the Nginx unit status page visible from the
|
||||
# outside of the container add the following port mapping:
|
||||
# - "8001:8081"
|
||||
healthcheck:
|
||||
# Time for which the health check can fail after the container is started.
|
||||
# This depends mostly on the performance of your database. On the first start,
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
UNIT_CONFIG="${UNIT_CONFIG-/etc/unit/nginx-unit.json}"
|
||||
# Also used in "nginx-unit.json"
|
||||
UNIT_SOCKET="/opt/unit/unit.sock"
|
||||
|
||||
load_configuration() {
|
||||
|
@ -1,30 +1,45 @@
|
||||
{
|
||||
"listeners": {
|
||||
"0.0.0.0:8080": {
|
||||
"pass": "routes"
|
||||
"pass": "routes/main"
|
||||
},
|
||||
"[::]:8080": {
|
||||
"pass": "routes"
|
||||
"pass": "routes/main"
|
||||
},
|
||||
"0.0.0.0:8081": {
|
||||
"pass": "routes/status"
|
||||
},
|
||||
"[::]:8081": {
|
||||
"pass": "routes/status"
|
||||
}
|
||||
},
|
||||
|
||||
"routes": [
|
||||
{
|
||||
"match": {
|
||||
"uri": "/static/*"
|
||||
"routes": {
|
||||
"main": [
|
||||
{
|
||||
"match": {
|
||||
"uri": "/static/*"
|
||||
},
|
||||
"action": {
|
||||
"share": "/opt/netbox/netbox${uri}"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"share": "/opt/netbox/netbox${uri}"
|
||||
{
|
||||
"action": {
|
||||
"pass": "applications/netbox"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"action": {
|
||||
"pass": "applications/netbox"
|
||||
],
|
||||
"status": [
|
||||
{
|
||||
"match": {
|
||||
"uri": "/status/*"
|
||||
},
|
||||
"action": {
|
||||
"proxy": "http://unix:/opt/unit/unit.sock"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
]
|
||||
},
|
||||
"applications": {
|
||||
"netbox": {
|
||||
"type": "python 3",
|
||||
@ -38,6 +53,5 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"access_log": "/dev/stdout"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user