Merge pull request #531 from SilvioMessi/fix-bug-530

[fireflyiii] Move upload folder to a persistent storage
This commit is contained in:
Alexandre
2022-10-29 19:31:10 +01:00
committed by GitHub
4 changed files with 24 additions and 1 deletions

View File

@@ -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

View File

@@ -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 #

View File

@@ -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]"
}

View File

@@ -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 #
################