From 3ef50090f6f58fc8085e52fc302769f20ce95e43 Mon Sep 17 00:00:00 2001 From: Silvio Messi Date: Sat, 29 Oct 2022 11:15:40 +0200 Subject: [PATCH 1/2] Move uploads to a persisten storage --- fireflyiii/Dockerfile | 3 +++ fireflyiii/rootfs/etc/cont-init.d/99-run.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/fireflyiii/Dockerfile b/fireflyiii/Dockerfile index 97bb06acd..b00049a30 100644 --- a/fireflyiii/Dockerfile +++ b/fireflyiii/Dockerfile @@ -40,6 +40,9 @@ RUN \ ################# if [ "$BUILD_UPSTREAM" = "5.7.14" ] ; then \ sed -i "s|, \$transaction\[\x27amount\x27\] ?? \x270\x27);|, (string)(\$transaction\[\x27amount\x27\] ?? \x270\x27));|g" /var/www/html/app/Helpers/Collector/GroupCollector.php; else echo "not 5.7.5"; fi +RUN \ + # Change upload folder to "ha_upload" since the default one is binded to a volume (see base image) + sed -i "s/'root' => storage_path('upload'),/'root' => storage_path('ha_upload'),/g" /var/www/html/config/filesystems.php ################## # 3 Install apps # diff --git a/fireflyiii/rootfs/etc/cont-init.d/99-run.sh b/fireflyiii/rootfs/etc/cont-init.d/99-run.sh index 18e13cfcc..598abcfc8 100644 --- a/fireflyiii/rootfs/etc/cont-init.d/99-run.sh +++ b/fireflyiii/rootfs/etc/cont-init.d/99-run.sh @@ -121,6 +121,24 @@ case $(bashio::config 'DB_CONNECTION') in esac +######################## +# Define upload folder # +######################## + +bashio::log.info "Defining upload folder" + +# Creating folder +if [ ! -d /config/addons_config/fireflyiii/upload ]; then + mkdir -p /config/addons_config/fireflyiii/upload + chown -R www-data:www-data /config/addons_config/fireflyiii/upload +fi + +# Creating symlink +if [ -d /var/www/html/storage/ha_upload ]; then + rm -r /var/www/html/storage/ha_upload +fi +ln -s /config/addons_config/fireflyiii/upload /var/www/html/storage/ha_upload + ################ # CRON OPTIONS # ################ From e0aba8ae15a705427d4b25e21a558d842e606356 Mon Sep 17 00:00:00 2001 From: Silvio Messi Date: Sat, 29 Oct 2022 18:21:01 +0000 Subject: [PATCH 2/2] Bump version to 5.7.14-2 --- fireflyiii/CHANGELOG.md | 2 ++ fireflyiii/config.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fireflyiii/CHANGELOG.md b/fireflyiii/CHANGELOG.md index e0a7ea930..7821bb949 100644 --- a/fireflyiii/CHANGELOG.md +++ b/fireflyiii/CHANGELOG.md @@ -1,3 +1,5 @@ +## 5.7.14-2 (29-10-2022) +- Fix bug #530 ## 5.7.14 (20-10-2022) - Update to latest version from firefly-iii/firefly-iii diff --git a/fireflyiii/config.json b/fireflyiii/config.json index 9776f4da4..054e48f9e 100644 --- a/fireflyiii/config.json +++ b/fireflyiii/config.json @@ -46,6 +46,6 @@ "slug": "fireflyiii", "startup": "services", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "5.7.14", + "version": "5.7.14-2", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" }