From 9a8a8547b07cf151c9326ef75a8fcae5897d0413 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 10 Jun 2022 23:00:26 +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(#184)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ⬆️ Upgrades add-on base image to 12.0.0 * ⬆️ Upgrades php8 to 8.0.20-r0 --- bookstack/Dockerfile | 40 +++++++++---------- bookstack/build.yaml | 10 ++--- bookstack/rootfs/etc/cont-init.d/bookstack.sh | 2 +- bookstack/rootfs/etc/cont-init.d/nginx.sh | 2 +- bookstack/rootfs/etc/fix-attrs.d/bookstack | 6 --- bookstack/rootfs/etc/php8/php-fpm.d/www.conf | 4 +- bookstack/rootfs/etc/services.d/nginx/finish | 12 +++--- bookstack/rootfs/etc/services.d/nginx/run | 6 +-- .../rootfs/etc/services.d/php-fpm/finish | 10 +++-- bookstack/rootfs/etc/services.d/php-fpm/run | 4 +- 10 files changed, 47 insertions(+), 49 deletions(-) mode change 100644 => 100755 bookstack/rootfs/etc/cont-init.d/bookstack.sh mode change 100644 => 100755 bookstack/rootfs/etc/cont-init.d/nginx.sh delete mode 100644 bookstack/rootfs/etc/fix-attrs.d/bookstack mode change 100644 => 100755 bookstack/rootfs/etc/services.d/nginx/finish mode change 100644 => 100755 bookstack/rootfs/etc/services.d/nginx/run mode change 100644 => 100755 bookstack/rootfs/etc/services.d/php-fpm/finish mode change 100644 => 100755 bookstack/rootfs/etc/services.d/php-fpm/run diff --git a/bookstack/Dockerfile b/bookstack/Dockerfile index 5516a21..5e5c830 100644 --- a/bookstack/Dockerfile +++ b/bookstack/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:11.1.2 +ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:12.0.0 # hadolint ignore=DL3006 FROM ${BUILD_FROM} @@ -9,27 +9,27 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # hadolint ignore=DL3003 RUN \ apk add --no-cache \ - mariadb-client=10.6.7-r0 \ - nginx=1.20.2-r1 \ - php8-curl=8.0.18-r0 \ - php8-dom=8.0.18-r0 \ - php8-fileinfo=8.0.18-r0 \ - php8-fpm=8.0.18-r0 \ - php8-gd=8.0.18-r0 \ - php8-ldap=8.0.18-r0 \ - php8-mbstring=8.0.18-r0 \ - php8-mysqlnd=8.0.18-r0 \ - php8-openssl=8.0.18-r0 \ - php8-pdo_mysql=8.0.18-r0 \ - php8-session=8.0.18-r0 \ - php8-simplexml=8.0.18-r0 \ - php8-tokenizer=8.0.18-r0 \ - php8-xml=8.0.18-r0 \ - php8-xmlwriter=8.0.18-r0 \ - php8=8.0.18-r0 \ + mariadb-client=10.6.8-r0 \ + nginx=1.22.0-r0 \ + php8-curl=8.0.20-r0 \ + php8-dom=8.0.20-r0 \ + php8-fileinfo=8.0.20-r0 \ + php8-fpm=8.0.20-r0 \ + php8-gd=8.0.20-r0 \ + php8-ldap=8.0.20-r0 \ + php8-mbstring=8.0.20-r0 \ + php8-mysqlnd=8.0.20-r0 \ + php8-openssl=8.0.20-r0 \ + php8-pdo_mysql=8.0.20-r0 \ + php8-session=8.0.20-r0 \ + php8-simplexml=8.0.20-r0 \ + php8-tokenizer=8.0.20-r0 \ + php8-xml=8.0.20-r0 \ + php8-xmlwriter=8.0.20-r0 \ + php8=8.0.20-r0 \ \ && apk add --no-cache --virtual .build-dependencies \ - composer=2.2.12-r0 \ + composer=2.3.7-r0 \ \ && curl -J -L -o /tmp/bookstack.tar.gz \ https://github.com/BookStackApp/BookStack/archive/v22.04.1.tar.gz \ diff --git a/bookstack/build.yaml b/bookstack/build.yaml index b7f18bc..9f7b211 100644 --- a/bookstack/build.yaml +++ b/bookstack/build.yaml @@ -1,10 +1,10 @@ --- build_from: - aarch64: ghcr.io/hassio-addons/base/aarch64:11.1.2 - amd64: ghcr.io/hassio-addons/base/amd64:11.1.2 - armhf: ghcr.io/hassio-addons/base/armhf:11.1.2 - armv7: ghcr.io/hassio-addons/base/armv7:11.1.2 - i386: ghcr.io/hassio-addons/base/i386:11.1.2 + 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/bookstack/rootfs/etc/cont-init.d/bookstack.sh b/bookstack/rootfs/etc/cont-init.d/bookstack.sh old mode 100644 new mode 100755 index c842f2d..1ebf096 --- a/bookstack/rootfs/etc/cont-init.d/bookstack.sh +++ b/bookstack/rootfs/etc/cont-init.d/bookstack.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Bookstack # This file validates config, creates the database and configures the app key diff --git a/bookstack/rootfs/etc/cont-init.d/nginx.sh b/bookstack/rootfs/etc/cont-init.d/nginx.sh old mode 100644 new mode 100755 index 1907407..2b68c5a --- a/bookstack/rootfs/etc/cont-init.d/nginx.sh +++ b/bookstack/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: Bookstack # This file configures nginx diff --git a/bookstack/rootfs/etc/fix-attrs.d/bookstack b/bookstack/rootfs/etc/fix-attrs.d/bookstack deleted file mode 100644 index 922166e..0000000 --- a/bookstack/rootfs/etc/fix-attrs.d/bookstack +++ /dev/null @@ -1,6 +0,0 @@ -/var/www/bookstack/storage/framework/views false nginx 0644 0755 -/var/www/bookstack/storage/framework/cache false nginx 0644 0755 -/var/www/bookstack/storage/framework/sessions false nginx 0644 0755 -/data/bookstack/uploads true nginx 0644 0755 -/data/bookstack/images true nginx 0644 0755 -/data/bookstack/files true nginx 0644 0755 \ No newline at end of file diff --git a/bookstack/rootfs/etc/php8/php-fpm.d/www.conf b/bookstack/rootfs/etc/php8/php-fpm.d/www.conf index 1f1923e..7c341fc 100644 --- a/bookstack/rootfs/etc/php8/php-fpm.d/www.conf +++ b/bookstack/rootfs/etc/php8/php-fpm.d/www.conf @@ -1,6 +1,6 @@ [www] -user = nginx -group = nginx +user = root +group = root listen = 127.0.0.1:9001 pm = dynamic pm.max_children = 10 diff --git a/bookstack/rootfs/etc/services.d/nginx/finish b/bookstack/rootfs/etc/services.d/nginx/finish old mode 100644 new mode 100755 index 61eddc4..276d5be --- a/bookstack/rootfs/etc/services.d/nginx/finish +++ b/bookstack/rootfs/etc/services.d/nginx/finish @@ -1,9 +1,11 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Bookstack -# Take down the S6 supervision tree when Nginx fails +# Take down the S6 supervision tree when NGINX 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 "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/bookstack/rootfs/etc/services.d/nginx/run b/bookstack/rootfs/etc/services.d/nginx/run old mode 100644 new mode 100755 index 1cc7644..ded3077 --- a/bookstack/rootfs/etc/services.d/nginx/run +++ b/bookstack/rootfs/etc/services.d/nginx/run @@ -1,12 +1,12 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Bookstack -# Runs the Nginx daemon +# Runs the NGINX daemon # ============================================================================== # Wait for PHP-FPM to become available bashio::net.wait_for 9001 -bashio::log.info "Starting NGinx..." +bashio::log.info "Starting NGINX..." exec nginx diff --git a/bookstack/rootfs/etc/services.d/php-fpm/finish b/bookstack/rootfs/etc/services.d/php-fpm/finish old mode 100644 new mode 100755 index ab93aff..3299b38 --- a/bookstack/rootfs/etc/services.d/php-fpm/finish +++ b/bookstack/rootfs/etc/services.d/php-fpm/finish @@ -1,9 +1,11 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Bookstack # Take down the S6 supervision tree when PHP FPM 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 "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/bookstack/rootfs/etc/services.d/php-fpm/run b/bookstack/rootfs/etc/services.d/php-fpm/run old mode 100644 new mode 100755 index b82316a..370c634 --- a/bookstack/rootfs/etc/services.d/php-fpm/run +++ b/bookstack/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: Bookstack # Runs the PHP-FPM daemon @@ -50,4 +50,4 @@ php8 /var/www/bookstack/artisan migrate --force bashio::log.info "Starting PHP-FPM..." -exec php-fpm8 --nodaemonize +exec php-fpm8 -R --nodaemonize