From 21bf1623e27dff903d5f9a78b9ca092199554829 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 9 Jun 2022 10:47:31 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Upgrades=20add-on=20base?= =?UTF-8?q?=20image=20to=2012.0.0=20(#298)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grocy/Dockerfile | 48 ++++++++++------------ grocy/build.yaml | 10 ++--- grocy/config.yaml | 1 + grocy/rootfs/etc/cont-init.d/grocy.sh | 2 +- grocy/rootfs/etc/cont-init.d/nginx.sh | 2 +- grocy/rootfs/etc/cont-init.d/php-fpm.sh | 2 +- grocy/rootfs/etc/services.d/nginx/finish | 10 +++-- grocy/rootfs/etc/services.d/nginx/run | 2 +- grocy/rootfs/etc/services.d/php-fpm/finish | 10 +++-- grocy/rootfs/etc/services.d/php-fpm/run | 2 +- 10 files changed, 45 insertions(+), 44 deletions(-) mode change 100644 => 100755 grocy/rootfs/etc/cont-init.d/grocy.sh mode change 100644 => 100755 grocy/rootfs/etc/cont-init.d/php-fpm.sh mode change 100644 => 100755 grocy/rootfs/etc/services.d/php-fpm/finish mode change 100644 => 100755 grocy/rootfs/etc/services.d/php-fpm/run diff --git a/grocy/Dockerfile b/grocy/Dockerfile index 5034bdc..04c9ed5 100755 --- a/grocy/Dockerfile +++ b/grocy/Dockerfile @@ -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} @@ -9,34 +9,30 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # hadolint ignore=DL3003 RUN \ apk add --no-cache \ - nginx=1.20.2-r0 \ + composer=2.3.7-r0 \ + nginx=1.22.0-r0 \ patch=2.7.6-r7 \ - php8-ctype=8.0.16-r0 \ - php8-exif=8.0.16-r0 \ - php8-fileinfo=8.0.16-r0 \ - php8-fpm=8.0.16-r0 \ - php8-gd=8.0.16-r0 \ - php8-iconv=8.0.16-r0 \ - php8-intl=8.0.16-r0 \ - php8-ldap=8.0.16-r0 \ - php8-mbstring=8.0.16-r0 \ - php8-opcache=8.0.16-r0 \ - php8-pdo_sqlite=8.0.16-r0 \ - php8-pdo=8.0.16-r0 \ - php8-simplexml=8.0.16-r0 \ - php8-tokenizer=8.0.16-r0 \ - php8=8.0.16-r0 \ - \ - && ln -s /usr/bin/php8 /usr/bin/php \ + php8-ctype=8.0.19-r1 \ + php8-exif=8.0.19-r1 \ + php8-fileinfo=8.0.19-r1 \ + php8-fpm=8.0.19-r1 \ + php8-gd=8.0.19-r1 \ + php8-iconv=8.0.19-r1 \ + php8-intl=8.0.19-r1 \ + php8-ldap=8.0.19-r1 \ + php8-mbstring=8.0.19-r1 \ + php8-opcache=8.0.19-r1 \ + php8-pdo_sqlite=8.0.19-r1 \ + php8-pdo=8.0.19-r1 \ + php8-simplexml=8.0.19-r1 \ + php8-tokenizer=8.0.19-r1 \ + php8=8.0.19-r1 \ \ && apk add --no-cache --virtual .build-dependencies \ - git=2.34.1-r0 \ - php8-openssl=8.0.16-r0 \ - php8-phar=8.0.16-r0 \ - yarn=1.22.17-r0 \ - \ - && curl -sS https://getcomposer.org/installer \ - | php -- --install-dir=/usr/local/bin --filename=composer \ + git=2.36.1-r0 \ + php8-openssl=8.0.19-r1 \ + php8-phar=8.0.19-r1 \ + yarn=1.22.19-r0 \ \ && yarn global add modclean \ \ diff --git a/grocy/build.yaml b/grocy/build.yaml index cb7c940..9f7b211 100644 --- a/grocy/build.yaml +++ b/grocy/build.yaml @@ -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: codenotary@frenck.dev signer: codenotary@frenck.dev diff --git a/grocy/config.yaml b/grocy/config.yaml index b8ded43..fb7e001 100644 --- a/grocy/config.yaml +++ b/grocy/config.yaml @@ -7,6 +7,7 @@ url: https://github.com/hassio-addons/addon-grocy codenotary: codenotary@frenck.dev ingress: true ingress_stream: true +init: false panel_icon: mdi:cart panel_admin: false arch: diff --git a/grocy/rootfs/etc/cont-init.d/grocy.sh b/grocy/rootfs/etc/cont-init.d/grocy.sh old mode 100644 new mode 100755 index f880f33..c4bb925 --- a/grocy/rootfs/etc/cont-init.d/grocy.sh +++ b/grocy/rootfs/etc/cont-init.d/grocy.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Sets up Grocy before the server starts diff --git a/grocy/rootfs/etc/cont-init.d/nginx.sh b/grocy/rootfs/etc/cont-init.d/nginx.sh index 39a4875..8a7ba90 100755 --- a/grocy/rootfs/etc/cont-init.d/nginx.sh +++ b/grocy/rootfs/etc/cont-init.d/nginx.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Configures NGINX for use with Grocy diff --git a/grocy/rootfs/etc/cont-init.d/php-fpm.sh b/grocy/rootfs/etc/cont-init.d/php-fpm.sh old mode 100644 new mode 100755 index 84cbb89..daa59b5 --- a/grocy/rootfs/etc/cont-init.d/php-fpm.sh +++ b/grocy/rootfs/etc/cont-init.d/php-fpm.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Configures PHP-FPM for use with Grocy diff --git a/grocy/rootfs/etc/services.d/nginx/finish b/grocy/rootfs/etc/services.d/nginx/finish index 9515bd2..7164ed1 100755 --- a/grocy/rootfs/etc/services.d/nginx/finish +++ b/grocy/rootfs/etc/services.d/nginx/finish @@ -1,9 +1,11 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # 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..." diff --git a/grocy/rootfs/etc/services.d/nginx/run b/grocy/rootfs/etc/services.d/nginx/run index f8b6b51..0b415d2 100755 --- a/grocy/rootfs/etc/services.d/nginx/run +++ b/grocy/rootfs/etc/services.d/nginx/run @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Runs the Nginx daemon diff --git a/grocy/rootfs/etc/services.d/php-fpm/finish b/grocy/rootfs/etc/services.d/php-fpm/finish old mode 100644 new mode 100755 index 69ae6a2..abd4030 --- a/grocy/rootfs/etc/services.d/php-fpm/finish +++ b/grocy/rootfs/etc/services.d/php-fpm/finish @@ -1,9 +1,11 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Take down the S6 supervision tree when PHP FPM fails # ============================================================================== -if { s6-test ${1} -ne 0 } -if { s6-test ${1} -ne 256 } +if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then + bashio::log.warning "PHP-FPM crashed, halting add-on" + /run/s6/basedir/bin/halt +fi -s6-svscanctl -t /var/run/s6/services +bashio::log.info "PHP-FPM stopped, restarting..." diff --git a/grocy/rootfs/etc/services.d/php-fpm/run b/grocy/rootfs/etc/services.d/php-fpm/run old mode 100644 new mode 100755 index 4d6ff04..5e224c7 --- a/grocy/rootfs/etc/services.d/php-fpm/run +++ b/grocy/rootfs/etc/services.d/php-fpm/run @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Grocy # Runs the PHP-FPM daemon