From 41865147bb31afba3ee7a7b8f5b9b3a8cc357cb1 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 9 Jun 2022 22:06:29 +0200 Subject: [PATCH] :ambulance: Fix Grocy startup issues --- grocy/Dockerfile | 3 ++- grocy/rootfs/etc/cont-init.d/grocy.sh | 5 ----- grocy/rootfs/etc/fix-attrs.d/01-grocy | 1 - grocy/rootfs/etc/php8/templates/php-fpm.gtpl | 4 ++-- grocy/rootfs/etc/services.d/php-fpm/run | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 grocy/rootfs/etc/fix-attrs.d/01-grocy diff --git a/grocy/Dockerfile b/grocy/Dockerfile index e3ff5ad..28f367f 100755 --- a/grocy/Dockerfile +++ b/grocy/Dockerfile @@ -56,9 +56,10 @@ RUN \ \ && find /var/www/ -type f -name "*.md" -depth -exec rm -f {} \; \ && rm -f -r \ - /tmp/* \ /etc/nginx \ + /etc/php8/php-fpm.d/www.conf \ /root/.composer \ + /tmp/* \ /usr/lib/node_modules \ /usr/local/bin/composer \ /usr/local/share/.cache \ diff --git a/grocy/rootfs/etc/cont-init.d/grocy.sh b/grocy/rootfs/etc/cont-init.d/grocy.sh index c4bb925..738dc28 100755 --- a/grocy/rootfs/etc/cont-init.d/grocy.sh +++ b/grocy/rootfs/etc/cont-init.d/grocy.sh @@ -8,11 +8,6 @@ if ! bashio::fs.directory_exists "/data/grocy"; then # Setup structure cp -R /var/www/grocy/data /data/grocy - - # Ensure file permissions - chown -R nginx:nginx /data/grocy - find /data/grocy -not -perm 0644 -type f -exec chmod 0644 {} \; - find /data/grocy -not -perm 0755 -type d -exec chmod 0755 {} \; fi if ! bashio::fs.directory_exists "/data/grocy/viewcache"; then diff --git a/grocy/rootfs/etc/fix-attrs.d/01-grocy b/grocy/rootfs/etc/fix-attrs.d/01-grocy deleted file mode 100644 index e497e78..0000000 --- a/grocy/rootfs/etc/fix-attrs.d/01-grocy +++ /dev/null @@ -1 +0,0 @@ -/data/grocy true nginx 0644 0755 diff --git a/grocy/rootfs/etc/php8/templates/php-fpm.gtpl b/grocy/rootfs/etc/php8/templates/php-fpm.gtpl index ec40377..0daa5d7 100644 --- a/grocy/rootfs/etc/php8/templates/php-fpm.gtpl +++ b/grocy/rootfs/etc/php8/templates/php-fpm.gtpl @@ -1,6 +1,6 @@ [{{ .name }}] -user = nginx -group = nginx +user = root +group = root listen = 127.0.0.1:{{ .port }} pm = dynamic pm.max_children = 10 diff --git a/grocy/rootfs/etc/services.d/php-fpm/run b/grocy/rootfs/etc/services.d/php-fpm/run index 5e224c7..96eaf7d 100755 --- a/grocy/rootfs/etc/services.d/php-fpm/run +++ b/grocy/rootfs/etc/services.d/php-fpm/run @@ -89,4 +89,4 @@ GROCY_CULTURE=$(bashio::config "culture") GROCY_CURRENCY=$(bashio::config "currency") GROCY_ENTRY_PAGE=$(bashio::config 'entry_page') -exec php-fpm8 --nodaemonize +exec php-fpm8 -R --nodaemonize