Skip to content

Commit

Permalink
⬆️ Upgrades add-on base image to 12.0.0 (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Jun 10, 2022
1 parent 771218b commit 6f2330f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
10 changes: 5 additions & 5 deletions log-viewer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:11.1.0
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:12.0.0
# hadolint ignore=DL3006
FROM ${BUILD_FROM}

Expand All @@ -8,12 +8,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install requirements for add-on
RUN \
apk add --no-cache \
nginx=1.20.2-r0 \
nodejs=16.14.0-r0 \
npm=8.1.3-r0 \
nginx=1.22.0-r0 \
nodejs=16.15.0-r1 \
npm=8.10.0-r0 \
\
&& apk add --no-cache --virtual .build-dependencies \
git=2.34.1-r0 \
git=2.36.1-r0 \
\
&& npm set unsafe-perm true \
\
Expand Down
10 changes: 5 additions & 5 deletions log-viewer/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
build_from:
aarch64: ghcr.io/hassio-addons/base/aarch64:11.1.0
amd64: ghcr.io/hassio-addons/base/amd64:11.1.0
armhf: ghcr.io/hassio-addons/base/armhf:11.1.0
armv7: ghcr.io/hassio-addons/base/armv7:11.1.0
i386: ghcr.io/hassio-addons/base/i386:11.1.0
aarch64: ghcr.io/hassio-addons/base/aarch64:12.0.0
amd64: ghcr.io/hassio-addons/base/amd64:12.0.0
armhf: ghcr.io/hassio-addons/base/armhf:12.0.0
armv7: ghcr.io/hassio-addons/base/armv7:12.0.0
i386: ghcr.io/hassio-addons/base/i386:12.0.0
codenotary:
base_image: [email protected]
signer: [email protected]
2 changes: 1 addition & 1 deletion log-viewer/rootfs/etc/cont-init.d/nginx.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Log Viewer
# Configures NGINX
Expand Down
10 changes: 6 additions & 4 deletions log-viewer/rootfs/etc/services.d/logviewer/finish
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/execlineb -S0
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Log Viewer
# Take down the S6 supervision tree when Log Viewer fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
bashio::log.warning "Log Viewer crashed, halting add-on"
/run/s6/basedir/bin/halt
fi

s6-svscanctl -t /var/run/s6/services
bashio::log.info "Log Viewer stopped, restarting..."
2 changes: 1 addition & 1 deletion log-viewer/rootfs/etc/services.d/logviewer/run
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Log Viewer
# Runs the Log Viewer
Expand Down
12 changes: 7 additions & 5 deletions log-viewer/rootfs/etc/services.d/nginx/finish
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/execlineb -S0
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Log Viewer
# Take down the S6 supervision tree when Nginx fails
# Take down the S6 supervision tree when NGINX fails
# ==============================================================================
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
bashio::log.warning "NGINX crashed, halting add-on"
/run/s6/basedir/bin/halt
fi

s6-svscanctl -t /var/run/s6/services
bashio::log.info "NGINX stopped, restarting..."
6 changes: 3 additions & 3 deletions log-viewer/rootfs/etc/services.d/nginx/run
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Log Viewer
# Runs the Nginx daemon
# Runs the NGINX daemon
# ==============================================================================

# Wait for the Log Viewer to become available
bashio::net.wait_for 4277

bashio::log.info "Starting NGinx..."
bashio::log.info "Starting NGINX..."
exec nginx

0 comments on commit 6f2330f

Please sign in to comment.