replace current version

This commit is contained in:
Alexandre
2022-01-15 08:54:00 +01:00
parent 3fdd7b6e5a
commit a522efbdd1
8 changed files with 76 additions and 32 deletions

View File

@@ -1,10 +1,14 @@
- Allowed automatic update in hourly, daily or weekly setting from addon options
## 5.6.10 (09-01-2022) ## 5.6.10 (09-01-2022)
- Update to latest version from firefly-iii/firefly-iii - Update to latest version from firefly-iii/firefly-iii
## 5.6.9 (04-01-2022) ## 5.6.9 (04-01-2022)
- Update to latest version from firefly-iii/firefly-iii - Update to latest version from firefly-iii/firefly-iii
## 5.6.8 (29-12-2021) ## 5.6.8 (29-12-2021)
- Update to latest version from firefly-iii/firefly-iii - Update to latest version from firefly-iii/firefly-iii
- Initial release - Initial release

View File

@@ -34,8 +34,19 @@ FROM ${BUILD_FROM}
# Copy local files # Copy local files
COPY rootfs/ / COPY rootfs/ /
# Modules
ARG MODULES="00-banner.sh 00-global_var.sh 90-config_yaml.sh"
# Automatic modules download
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \
mkdir -p /tmpscripts /etc/cont-init.d && \
for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done && \
if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi && \
rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" > /MODULESFILE
# Manual apps # Manual apps
ENV PACKAGES="" ENV PACKAGES="cron"
# Automatic apps & bashio # Automatic apps & bashio
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \

View File

@@ -34,6 +34,7 @@ Options can be configured through two ways :
"DB_DATABASE": "CHANGEME" # only needed if using a remote database "DB_DATABASE": "CHANGEME" # only needed if using a remote database
"DB_USERNAME": "CHANGEME" # only needed if using a remote database "DB_USERNAME": "CHANGEME" # only needed if using a remote database
"DB_PASSWORD": "CHANGEME" # only needed if using a remote database "DB_PASSWORD": "CHANGEME" # only needed if using a remote database
"Updates": hourly|daily|weekly # Sets an automatic update
``` ```
- Config.yaml - Config.yaml

View File

@@ -1,27 +1,20 @@
{ {
"apparmor": true, "apparmor": true,
"arch": [ "arch": ["aarch64", "amd64", "armv7", "armhf"],
"aarch64",
"amd64",
"armv7",
"armhf"
],
"boot": "auto", "boot": "auto",
"description": "A free and open source personal finance manager", "description": "A free and open source personal finance manager",
"devices": [], "devices": [],
"environment": { "environment": {
"TRUSTED_PROXIES": "**" "TRUSTED_PROXIES": "**",
"DB_DATABASE": "/config/addons_config/fireflyiii/database/database.sqlite"
}, },
"map": [ "map": ["config:rw", "share:rw", "ssl"],
"config:rw",
"share:rw",
"ssl"
],
"name": "Firefly iii", "name": "Firefly iii",
"options": { "options": {
"DB_CONNECTION": "sqlite_internal", "DB_CONNECTION": "sqlite_internal",
"APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", "APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO",
"CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml",
"Updates": "daily"
}, },
"ports": { "ports": {
"8080/tcp": 3473 "8080/tcp": 3473
@@ -37,12 +30,11 @@
"DB_PORT": "str?", "DB_PORT": "str?",
"DB_DATABASE": "str?", "DB_DATABASE": "str?",
"DB_USERNAME": "str?", "DB_USERNAME": "str?",
"DB_PASSWORD": "str?" "DB_PASSWORD": "str?",
"Updates": "list(|hourly|daily|weekly)?"
}, },
"slug": "fireflyiii", "slug": "fireflyiii",
"services": [ "services": ["mysql:want"],
"mysql:want"
],
"upstream": "5.6.10", "upstream": "5.6.10",
"url": "https://github.com/alexbelgium/hassio-addons", "url": "https://github.com/alexbelgium/hassio-addons",
"version": "5.6.10-2", "version": "5.6.10-2",

View File

@@ -5,7 +5,7 @@ echo "Starting..."
# Starting scripts # # Starting scripts #
#################### ####################
for SCRIPTS in /scripts/*; do for SCRIPTS in /etc/cont-init.d/*; do
[ -e "$SCRIPTS" ] || continue [ -e "$SCRIPTS" ] || continue
echo "$SCRIPTS: executing" echo "$SCRIPTS: executing"
chown "$(id -u)":"$(id -g)" "$SCRIPTS" chown "$(id -u)":"$(id -g)" "$SCRIPTS"

View File

@@ -1,5 +1,22 @@
#!/bin/bash #!/bin/bash
# If dockerfile failed install manually # If dockerfile failed install manually
if [ -e "/MODULESFILE" ]; then
echo "Executing modules script"
PACKAGES=$(</MODULESFILE)
(
##############################
# Automatic modules download #
##############################
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&
mkdir -p /tmpscripts /etc/cont-init.d &&
for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done &&
if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi &&
rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" >/MODULESFILE
) >/dev/null
fi
if [ -e "/ENVFILE" ]; then if [ -e "/ENVFILE" ]; then
echo "Executing script" echo "Executing script"
PACKAGES=$(</ENVFILE) PACKAGES=$(</ENVFILE)

View File

@@ -23,7 +23,7 @@ CURRENT=$(sed -e '/^[<blank><tab>]*$/d' /config/addons_config/fireflyiii/APP_KEY
# Save if new # Save if new
if [ "$CURRENT" != "$APP_KEY" ]; then if [ "$CURRENT" != "$APP_KEY" ]; then
echo "$APP_KEY" >>/config/addons_config/fireflyiii/APP_KEY_BACKUP.txt echo "$APP_KEY" >>/config/addons_config/fireflyiii/APP_KEY_BACKUP.txt
fi fi
################### ###################
@@ -38,6 +38,7 @@ sqlite_internal)
bashio::log.info "Using built in sqlite" bashio::log.info "Using built in sqlite"
# Set variable # Set variable
export DB_CONNECTION=sqlite export DB_CONNECTION=sqlite
export DB_DATABASE=/config/addons_config/fireflyiii/database/database.sqlite
# Creating database # Creating database
mkdir -p /config/addons_config/fireflyiii/database mkdir -p /config/addons_config/fireflyiii/database
rm -r /var/www/html/storage/database rm -r /var/www/html/storage/database
@@ -53,9 +54,9 @@ mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Detecting values..." bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Detecting values..."
if ! bashio::services.available 'mysql'; then if ! bashio::services.available 'mysql'; then
bashio::log.fatal \ bashio::log.fatal \
"Local database access should be provided by the MariaDB addon" "Local database access should be provided by the MariaDB addon"
bashio::exit.nok \ bashio::exit.nok \
"Please ensure it is installed and started" "Please ensure it is installed and started"
fi fi
# Use values # Use values
@@ -76,9 +77,9 @@ mariadb_addon)
apt-get clean apt-get clean
bashio::log.info "Creating database for Firefly-iii if required" bashio::log.info "Creating database for Firefly-iii if required"
mysql \ mysql \
-u "${DB_USERNAME}" -p"${DB_PASSWORD}" \ -u "${DB_USERNAME}" -p"${DB_PASSWORD}" \
-h "${DB_HOST}" -P "${DB_PORT}" \ -h "${DB_HOST}" -P "${DB_PORT}" \
-e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;"
;; ;;
# Use remote # Use remote
@@ -94,8 +95,23 @@ mariadb_addon)
esac esac
# Install database # Install database
php artisan migrate --seed bashio::log.info "Updating database"
php artisan firefly-iii:upgrade-database php artisan migrate --seed >/dev/null
php artisan firefly-iii:upgrade-database >/dev/null
################
# CRON OPTIONS #
################
# Align update with options
echo ""
FREQUENCY=$(bashio::config 'Updates')
bashio::log.info "$FREQUENCY updates"
echo ""
# Sets cron // do not delete this message
cp /templates/cronupdate /etc/cron.${FREQUENCY}/
chmod 775 /etc/cron.${FREQUENCY}/cronupdate
############## ##############
# LAUNCH APP # # LAUNCH APP #

View File

@@ -0,0 +1,3 @@
#!/bin/bash
/usr/local/bin/php /var/www/html/artisan firefly:cron