From 88fbe874721675a374f126fbdfc0c4ef14884691 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 17 Sep 2020 08:28:21 +0300 Subject: [PATCH 1/4] apply more sane permissions on cache directories --- src/app/startup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/startup.sh b/src/app/startup.sh index 68a7cae..0ba3773 100755 --- a/src/app/startup.sh +++ b/src/app/startup.sh @@ -42,7 +42,8 @@ for d in cache lock feed-icons plugins.local themes.local; do done for d in cache lock feed-icons; do - chmod -R 777 $DST_DIR/$d + chmod 777 $DST_DIR/$d + find $DST_DIR/$d -type f -exec chmod 666 {} \; done chown -R $OWNER_UID:$OWNER_GID $DST_DIR \ From 47a828bc6060a7c19663f4259dc3eb0b2a320761 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 29 Sep 2020 12:28:06 +0300 Subject: [PATCH 2/4] set /tt-rss/backups as internal --- src/web-nginx/nginx.conf | 4 ++++ src/web-ssl/Caddyfile | 3 ++- src/web/Caddyfile | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/web-nginx/nginx.conf b/src/web-nginx/nginx.conf index efe2eea..033f9da 100644 --- a/src/web-nginx/nginx.conf +++ b/src/web-nginx/nginx.conf @@ -29,6 +29,10 @@ http { internal; } + location /tt-rss/backups { + internal; + } + location ~ \.php$ { # regex to split $uri to $fastcgi_script_name and $fastcgi_path fastcgi_split_path_info ^(.+?\.php)(/.*)$; diff --git a/src/web-ssl/Caddyfile b/src/web-ssl/Caddyfile index 56c2239..076829c 100644 --- a/src/web-ssl/Caddyfile +++ b/src/web-ssl/Caddyfile @@ -5,4 +5,5 @@ root /var/www/html log stdout errors stderr internal /tt-rss/cache -fastcgi / app:9000 php \ No newline at end of file +internal /tt-rss/backups +fastcgi / app:9000 php diff --git a/src/web/Caddyfile b/src/web/Caddyfile index e65d2c8..19999ab 100644 --- a/src/web/Caddyfile +++ b/src/web/Caddyfile @@ -3,4 +3,5 @@ root /var/www/html log stdout errors stderr internal /tt-rss/cache -fastcgi / app:9000 php \ No newline at end of file +internal /tt-rss/backups +fastcgi / app:9000 php From 673e4a37876a1c64a16001417d049f85e8caf8b5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 28 Sep 2020 13:55:38 +0300 Subject: [PATCH 3/4] update schema on startup --- src/app/startup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/startup.sh b/src/app/startup.sh index 0ba3773..2e2d52e 100755 --- a/src/app/startup.sh +++ b/src/app/startup.sh @@ -84,6 +84,8 @@ else -i.bak $DST_DIR/config.php fi +cd $DST_DIR && sudo -u app php ./update.php --update-schema force-yes + touch $DST_DIR/.app_is_ready sudo -u app /usr/sbin/php-fpm7 -F From 910ddaa77cb82a6ba0233932cd74ae14653c04c2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 30 Sep 2020 06:58:06 +0300 Subject: [PATCH 4/4] use different CLI syntax for update-schema --- src/app/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/startup.sh b/src/app/startup.sh index 2e2d52e..df8758f 100755 --- a/src/app/startup.sh +++ b/src/app/startup.sh @@ -84,7 +84,7 @@ else -i.bak $DST_DIR/config.php fi -cd $DST_DIR && sudo -u app php ./update.php --update-schema force-yes +cd $DST_DIR && sudo -u app php ./update.php --update-schema=force-yes touch $DST_DIR/.app_is_ready