From 8ce23f3a181dd3e30b8741ff2badb309d703d898 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 14:29:05 +0100 Subject: [PATCH 01/60] initial version --- firefly_iii/CHANGELOG.md | 1 + firefly_iii/Dockerfile | 80 ++++++++++++++ firefly_iii/Readme.md | 68 ++++++++++++ firefly_iii/apparmor.txt | 48 +++++++++ firefly_iii/build.json | 8 ++ firefly_iii/config.json | 37 +++++++ firefly_iii/icon.png | Bin 0 -> 11275 bytes firefly_iii/logo.png | Bin 0 -> 11275 bytes firefly_iii/rootfs/entrypoint.sh | 16 +++ .../scripts/00-aaa_dockerfile_backup.sh | 18 ++++ firefly_iii/rootfs/scripts/00-banner.sh | 39 +++++++ firefly_iii/rootfs/scripts/00-global_var.sh | 33 ++++++ firefly_iii/rootfs/scripts/20-folders.sh | 12 +++ firefly_iii/rootfs/scripts/92-config_yaml.sh | 102 ++++++++++++++++++ firefly_iii/rootfs/scripts/99-run.sh | 68 ++++++++++++ 15 files changed, 530 insertions(+) create mode 100644 firefly_iii/CHANGELOG.md create mode 100644 firefly_iii/Dockerfile create mode 100644 firefly_iii/Readme.md create mode 100644 firefly_iii/apparmor.txt create mode 100644 firefly_iii/build.json create mode 100644 firefly_iii/config.json create mode 100644 firefly_iii/icon.png create mode 100644 firefly_iii/logo.png create mode 100644 firefly_iii/rootfs/entrypoint.sh create mode 100644 firefly_iii/rootfs/scripts/00-aaa_dockerfile_backup.sh create mode 100644 firefly_iii/rootfs/scripts/00-banner.sh create mode 100644 firefly_iii/rootfs/scripts/00-global_var.sh create mode 100644 firefly_iii/rootfs/scripts/20-folders.sh create mode 100644 firefly_iii/rootfs/scripts/92-config_yaml.sh create mode 100644 firefly_iii/rootfs/scripts/99-run.sh diff --git a/firefly_iii/CHANGELOG.md b/firefly_iii/CHANGELOG.md new file mode 100644 index 000000000..66f7e8b76 --- /dev/null +++ b/firefly_iii/CHANGELOG.md @@ -0,0 +1 @@ +- Initial release diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile new file mode 100644 index 000000000..783ee21a1 --- /dev/null +++ b/firefly_iii/Dockerfile @@ -0,0 +1,80 @@ +#==========================# +# ALEXBELGIUM'S DOCKERFILE # +#==========================# +#           _.------. +#       _.-`    ('>.-`"""-. +# '.--'`       _'`   _ .--.) +#    -'         '-.-';`   ` +#    ' -      _.'  ``'--.  +#        '---`    .-'""` +#               /` + +################# +# 1 Build Image # +################# + +ARG BUILD_FROM +ARG BUILD_VERSION +FROM ${BUILD_FROM} + +################## +# 2 Modify Image # +################## + +ENV DB_CONNECTION=sqlite + +################## +# 3 Install apps # +################## + +# Copy local files +COPY rootfs/ / + +# Manual apps +ENV PACKAGES="" + +# 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 && \ + 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 && \ + curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \ + chmod 777 /automatic_packages.sh && \ + /automatic_packages.sh "${PACKAGES:-}" && \ + rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE + +################ +# 4 Entrypoint # +################ + +RUN chmod 777 /entrypoint.sh +ENTRYPOINT [ "/usr/bin/env" ] +CMD [ "/entrypoint.sh" ] + +############ +# 5 Labels # +############ + +ARG BUILD_ARCH +ARG BUILD_DATE +ARG BUILD_DESCRIPTION +ARG BUILD_NAME +ARG BUILD_REF +ARG BUILD_REPOSITORY +ARG BUILD_VERSION +LABEL \ + io.hass.name="${BUILD_NAME}" \ + io.hass.description="${BUILD_DESCRIPTION}" \ + io.hass.arch="${BUILD_ARCH}" \ + io.hass.type="addon" \ + io.hass.version=${BUILD_VERSION} \ + maintainer="alexbelgium (https://github.com/alexbelgium)" \ + org.opencontainers.image.title="${BUILD_NAME}" \ + org.opencontainers.image.description="${BUILD_DESCRIPTION}" \ + org.opencontainers.image.vendor="Home Assistant Add-ons" \ + org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.url="https://github.com/alexbelgium" \ + org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \ + org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \ + org.opencontainers.image.created=${BUILD_DATE} \ + org.opencontainers.image.revision=${BUILD_REF} \ + org.opencontainers.image.version=${BUILD_VERSION} diff --git a/firefly_iii/Readme.md b/firefly_iii/Readme.md new file mode 100644 index 000000000..0119b880a --- /dev/null +++ b/firefly_iii/Readme.md @@ -0,0 +1,68 @@ +# Home assistant add-on: fireflyiii + +[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium) + +[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white + +![Supports + Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] +![Supports smb mounts][smb-shield] + +_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_ + +[![Stargazers repo roster for @alexbelgium/hassio-addons](https://reporoster.com/stars/alexbelgium/hassio-addons)](https://github.com/alexbelgium/hassio-addons/stargazers) + +## About + +[fireflyiii](https://www.firefly-iii.org) a personal finances manager. +This addon is based on the docker image https://hub.docker.com/r/fireflyiii/core + +## Installation + +The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on. + +1. Add my add-ons repository to your home assistant instance (in supervisor addons store at top right, or click button below if you have configured my HA) + [![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons) +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Set the add-on options to your preferences +1. Start the add-on. +1. Check the logs of the add-on to see if everything went well. +1. Open the webUI and adapt the software options + +## Configuration + +Options can be configured through two ways : + +- Addon options + +```yaml +"CONFIG_LOCATION": location of the config.yaml file that allows setting additional environment variables (see below) +"DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)" # Defines if you are using the built in sqlite ; the mariadb addon ; or a remote database +"DB_HOST": "CHANGEME" # only needed if using a remote database +"DB_PORT": "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_PASSWORD": "CHANGEME" # only needed if using a remote database +``` + +- Config.yaml + +Configuration is done by customizing the config.yaml in the location defined in your addon options + +The complete list of options can be seen here : https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/.env.example + +## Support + +Create an issue on github + +## Illustration + +![illustration](https://raw.githubusercontent.com/firefly-iii/firefly-iii/develop/.github/assets/img/imac-complete.png) + +[repository]: https://github.com/alexbelgium/hassio-addons +[smb-shield]: https://img.shields.io/badge/smb-yes-green.svg +[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg diff --git a/firefly_iii/apparmor.txt b/firefly_iii/apparmor.txt new file mode 100644 index 000000000..64fe0c328 --- /dev/null +++ b/firefly_iii/apparmor.txt @@ -0,0 +1,48 @@ +#include + +profile fireflyiii_addon flags=(attach_disconnected,mediate_deleted) { + #include + + capability, + file, + mount, + umount, + remount, + + capability setgid, + capability setuid, + capability sys_admin, + capability dac_read_search, + # capability dac_override, + # capability sys_rawio, + +# S6-Overlay + /bin/** ix, + /usr/bin/** ix, + /usr/lib/bashio/** ix, + /etc/s6/** rix, + /run/s6/** rix, + /etc/services.d/** rwix, + /etc/cont-init.d/** rwix, + /etc/cont-finish.d/** rwix, + /init rix, + /var/run/** mrwkl, + /var/run/ mrwkl, + /dev/i2c-1 mrwkl, + # Files required + /dev/sda1 mrwkl, + /dev/sdb1 mrwkl, + /dev/mmcblk0p1 mrwkl, + /dev/* mrwkl, + /tmp/** mrkwl, + + # Data access + /data/** rw, + + # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container + ptrace (trace,read) peer=docker-default, + + # docker daemon confinement requires explict allow rule for signal + signal (receive) set=(kill,term) peer=/usr/bin/docker, + +} diff --git a/firefly_iii/build.json b/firefly_iii/build.json new file mode 100644 index 000000000..b46b44d2d --- /dev/null +++ b/firefly_iii/build.json @@ -0,0 +1,8 @@ +{ + "build_from": { + "armhf": "fireflyiii/core:latest", + "armv7": "fireflyiii/core:latest", + "aarch64": "fireflyiii/core:latest", + "amd64": "fireflyiii/core:latest" + } +} diff --git a/firefly_iii/config.json b/firefly_iii/config.json new file mode 100644 index 000000000..c9de829cc --- /dev/null +++ b/firefly_iii/config.json @@ -0,0 +1,37 @@ +{ + "apparmor": true, + "arch": ["aarch64", "amd64", "armv7", "armhf"], + "boot": "auto", + "description": "A free and open source personal finance manager", + "devices": [], + "environment": { + "TRUSTED_PROXIES": "**" + }, + "map": ["config:rw", "share:rw", "ssl"], + "name": "fireflyiii", + "options": { + "DB_CONNECTION": "sqlite", + "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" + }, + "ports": { + "80/tcp": 3473 + }, + "ports_description": { + "80/tcp": "web interface" + }, + "schema": { + "CONFIG_LOCATION": "str", + "DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)", + "DB_HOST": "str?", + "DB_PORT": "str?", + "DB_DATABASE": "str?", + "DB_USERNAME": "str?", + "DB_PASSWORD": "str?" + }, + "slug": "fireflyiii", + "services": ["mysql:want"], + "upstream": "5.6.7", + "url": "https://github.com/alexbelgium/hassio-addons", + "version": "5.6.7", + "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" +} diff --git a/firefly_iii/icon.png b/firefly_iii/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..af3334c9cee500ecc8dd1d606928e93b991fcfb8 GIT binary patch literal 11275 zcmZ{~1yo#1);8R@TY`H61g9H!hv4q64Z#WS5D4xrK@;5F-Q8UR1b27)$eo!x`R_k( z_c~Sk?0TMURl8SruM;dUD~5uIj|cz&P$a}f6klhT*Q*j9_H_)#L3$kl5cY~dciz5x*U0GPjI0KgD};BVO+g6iKG$X5&_;B^FG zyk2$?On=FkukzPGGXV6zxk<0{Z;|fz@Sj=U%mr*|W#C|AN6O5=$-o2vFoBpDxj-yj zAZAh!`)`4f6##(Bg!pefnUH_mbjgJJTdw?V-KOWA`RjyWE3RP=05FjKz93w3_?-X% zXeu*hbq94BX)YrhD+U8&8$&RIis7P@I~b6{5Spej`#g12M1d&Akf*_ znZcQv!N$%M$jHgb2?Q|#nV9Hb5%l)1)(!?P^w#!d|1$C)J0f6vBRex&2QwRM(%*Is z3~d}8c;CPO?db2bf~~;T4)(7+M&RH1zoy6YJ8~{z8%rBIC0hd{ zFdrk&U&;Kb`fnxvh5qXpsf(DsTC{(y8XqGQ=-;G&uKZ7?#ve>}jz5`yto*@zEgzS# z9r*XLRkpFQ-h;pJf9n2;SO0HV ze9WN#c=%KMPlm?-Wc;c9gJEpMW$$Qc4mNW5tK7F|pf zwRi{#4kLkgNg>sE5t~Dq9O5NUHbK%*$o;lAsdz%b-!_Q-sXHsWHbBK?_r%1LB ze&q)Y5x)OIt-*fgSt2;ii$R8p=M9TJRI`B|A}nrF8aLis{;S#R5(p3BIV_FnlRon& z;7Mu$&INNg#R9&*{I+gpsEqB(3-acfuaz+B0d>)2-%quS^soVai({;P=o;4c7!kN2 z7&?IZ30!RZ!3?~jb73LP*j|~;)5Vzv+Rj%ld8ZLm3m?Z79>`}c%1~6}rAC9Oxs9G$ zjRtC7vZs?RAn(dZ>6-tfwH6feLP59Bv^MYxR-V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SHGjNZRj7*Ro187uh)grGh*)I#x~Ws$zt}qGe&gZJAImQ4FGJ;Zcr-O zHw#n0=>f1`+}25bI(S*8U1s$M=W)1yT&Nl0efgBBi!qJ7D&0fKQS+3o7s{dc`aIVz zeLBZsk%R3!I*Eh%`-*C0+ZUbv8EdYWt~D_qLE6HtfHtX`<&a~_h{{=(JQrvW;}3=) zVBc9n_X$qEmA2n3G|0t=lSy|wEE=LJjW?}p0*H!g9K%U2FK@ob337ARKY~dJ1c2&>$GK?1z0 zKBW(8qT>Tn<(YGjTN8v`$BO6bQZ=2fjs#-+^C%sOyDa~0iEQs9uw5d!vr}DIt{B3& zwmA86N70VIb7{oonzI1#z};)XqQ1lo|HO<;l$UfbaYtLx&W@z$0yAnb5|?|aSM4SH zK1KQFeRL3ZW<+Z!8$G8}bq|*AR6QKh5+89;KwOf!=OEI>29t0jmBQLNuBNYVkuQSz zF~B_CU#W<(n9AU;r!*K2XZ@-pVg#zuKz3<=o?|BfhLDf!^MD<|e$JqqUazUKZ=-z5 z3)>zY)&5#InZmf5V03&^yG|{mx34tV@5(_Y0eXIwrx|dkn&kfk5k4Fwf$8Sm@%eH4 z!j4#3{z$QV@JaN4%@H>aJ`|<;|mpDjF#9!}L+q z3{q_MVde3C#ddaObi1jPu0(A<*6xs0ix|58V3yAvOrm7LVJMRbL%5%PBpqo_Q!Tae|-~-EDqij_>ZEncbs{~xWTd6Po zoRTr}dJ+Amdb0+V_kwT?W6{KbRtg>in=G=@opZL9cFv?)<#@o7qRVf}Iw_$!Qt?F?i7(FrV+ zt^Q6c;S4=<{4{oqd9`nuij)S^1;B-*S/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 && + curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && + chmod 777 /automatic_packages.sh && + eval /./automatic_packages.sh "$PACKAGES" && + rm /automatic_packages.sh + ) >/dev/null + +fi diff --git a/firefly_iii/rootfs/scripts/00-banner.sh b/firefly_iii/rootfs/scripts/00-banner.sh new file mode 100644 index 000000000..0ac294e9a --- /dev/null +++ b/firefly_iii/rootfs/scripts/00-banner.sh @@ -0,0 +1,39 @@ +#!/usr/bin/with-contenv bashio +# ============================================================================== +# Displays a simple add-on banner on startup +# ============================================================================== + +if bashio::supervisor.ping; then + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue " Add-on: $(bashio::addon.name)" + bashio::log.blue " $(bashio::addon.description)" + bashio::log.blue \ + '-----------------------------------------------------------' + + bashio::log.blue " Add-on version: $(bashio::addon.version)" + if bashio::var.true "$(bashio::addon.update_available)"; then + bashio::log.magenta ' There is an update available for this add-on!' + bashio::log.magenta \ + " Latest add-on version: $(bashio::addon.version_latest)" + bashio::log.magenta ' Please consider upgrading as soon as possible.' + else + bashio::log.green ' You are running the latest version of this add-on.' + fi + + bashio::log.blue " System: $(bashio::info.operating_system)" \ + " ($(bashio::info.arch) / $(bashio::info.machine))" + bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" + bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" + + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue \ + ' Please, share the above information when looking for help' + bashio::log.blue \ + ' or support in, e.g., GitHub, forums' + bashio::log.green \ + ' https://github.com/alexbelgium/hassio-addons' + bashio::log.blue \ + '-----------------------------------------------------------' +fi diff --git a/firefly_iii/rootfs/scripts/00-global_var.sh b/firefly_iii/rootfs/scripts/00-global_var.sh new file mode 100644 index 000000000..e88ad363a --- /dev/null +++ b/firefly_iii/rootfs/scripts/00-global_var.sh @@ -0,0 +1,33 @@ +#!/usr/bin/with-contenv bashio + +################################### +# Export all addon options as env # +################################### + +# For all keys in options.json +JSONSOURCE="/data/options.json" + +# Export keys as env variables +# echo "All addon options were exported as variables" +mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) +for KEYS in ${arr[@]}; do + # export key + VALUE=$(jq .$KEYS ${JSONSOURCE}) + line="${KEYS}=${VALUE//[\"\']/}" + # Use locally + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi + export $line + # Export the variable to run scripts + line="${KEYS}=${VALUE//[\"\']/} &>/dev/null" + sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run* +done + +################ +# Set timezone # +################ +if [ ! -z "TZ" ] && [ -f /etc/localtime ]; then + if [ -f /usr/share/zoneinfo/$TZ ]; then + echo "Timezone set from $(cat /etc/timezone) to $TZ" + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone + fi +fi diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh new file mode 100644 index 000000000..9d4bc21b6 --- /dev/null +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bashio + +echo "Connecting database to /config/addons_config/firefly_iii" + +# Create directory +mkdir -p /config/addons_config/firefly_iii + +# Make sure permissions are right +chown $(id -u):$(id -g) /config/addons_config/firefly_iii + +# Make symlink +ln -snf /var/www/html/storage /config/addons_config/firefly_iii diff --git a/firefly_iii/rootfs/scripts/92-config_yaml.sh b/firefly_iii/rootfs/scripts/92-config_yaml.sh new file mode 100644 index 000000000..97a89cbaa --- /dev/null +++ b/firefly_iii/rootfs/scripts/92-config_yaml.sh @@ -0,0 +1,102 @@ +#!/usr/bin/with-contenv bashio + +################## +# INITIALIZATION # +################## + +# Where is the config +CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION") + +# Check if config file is there, or create one from template +if [ -f $CONFIGSOURCE ]; then + echo "Using config file found in $CONFIGSOURCE" +else + echo "No config file, creating one from template" + # Create folder + mkdir -p "$(dirname "${CONFIGSOURCE}")" + # Placing template in config + if [ -f /templates/config.yaml ]; then + # Use available template + cp /templates/config.yaml "$(dirname "${CONFIGSOURCE}")" + else + # Download template + TEMPLATESOURCE="https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/config.template" + curl -L -f -s $TEMPLATESOURCE --output $CONFIGSOURCE + fi + # Need to restart + bashio::log.fatal "Config file not found, creating a new one. Please customize the file in $CONFIGSOURCE before restarting." + # bashio::exit.nok +fi + +# Check if yaml is valid +EXIT_CODE=0 +yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +if [ $EXIT_CODE = 0 ]; then + echo "Config file is a valid yaml" +else + cat ERROR + bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above." + # bashio::exit.nok +fi + +# Export all yaml entries as env variables +# Helper function +function parse_yaml { + local prefix=$2 || local prefix="" + local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') + sed -ne "s|^\($s\):|\1|" \ + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + awk -F$fs '{ + indent = length($1)/2; + vname[indent] = $2; + for (i in vname) {if (i > indent) {delete vname[i]}} + if (length($3) > 0) { + vn=""; for (i=0; i/tmpfile +while IFS= read -r line; do + # Clean output + line=${line//[\"\']/} + # Check if secret + if [[ "${line}" == *'!secret '* ]]; then + echo "secret detected" + secret=${line#*secret } + # Check if single match + secretnum=$(sed -n "/$secret:/=" /config/secrets.yaml) + [[ $(echo $secretnum) == *' '* ]] && bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file" + # Get text + secret=$(sed -n "/$secret:/p" /config/secrets.yaml) + secret=${secret#*: } + line="${line%%=*}=$secret" + fi + # Data validation + if [[ $line =~ ^.+[=].+$ ]]; then + export $line + # Export the variable + sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true + sed -i "1a export $line" /scripts/*run* 2>/dev/null || true + # Show in log + if ! bashio::config.false "verbose";then bashio::log.blue "$line"; fi + else + bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." + fi +done <"/tmpfile" + +# Test mode +TZ=$(bashio::config "TZ") +if [ $TZ = "test" ]; then + echo "secret mode found, launching script in /config/test.sh" + cd /config + chmod 777 test.sh + ./test.sh +fi diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh new file mode 100644 index 000000000..9e6df038d --- /dev/null +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bashio + +bashio::log.info "Launching app" + +# Create API key if needed +if ! bashio::fs.file_exists "/data/firefly/appkey.txt"; then + #Command fails without appkey set, this won't be used again + export APP_KEY=SomeRandomStringOf32CharsExactly + bashio::log.info "Generating app key" + key=$(php /var/www/firefly/artisan key:generate --show) + echo "${key}" >/data/firefly/appkey.txt + bashio::log.info "App Key generated: ${key}" +fi + +# Define database +case $(bashio::config 'DB_CONNECTION') in + +# Use sqlite +sqlite_internal) + bashio::log.info "Using built in sqlite" + touch ./storage/database/database.sqlite + php artisan migrate --seed + php artisan firefly-iii:upgrade-database + ;; + +# Use MariaDB +mariadb_addon) + bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon" + if ! bashio::services.available 'mysql'; then + bashio::log.fatal \ + "Local database access should be provided by the MariaDB addon" + bashio::exit.nok \ + "Please ensure it is installed and started" + fi + + host=$(bashio::services "mysql" "host") + password=$(bashio::services "mysql" "password") + port=$(bashio::services "mysql" "port") + username=$(bashio::services "mysql" "username") + + bashio::log.warning "Firefly-iii is using the Maria DB addon" + bashio::log.warning "Please ensure this is included in your backups" + bashio::log.warning "Uninstalling the MariaDB addon will remove any data" + + bashio::log.info "Creating database for Firefly-iii if required" + mysql \ + -u "${username}" -p"${password}" \ + -h "${host}" -P "${port}" \ + -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" + ;; + +# Use remote +*) + bashio::log.info "Using remote database. Requirement : filling all addon options fields" + for conditions in "DB_HOST" "DB_PORT" "DB_DATABASE" "DB_USERNAME" "DB_PASSWORD"; do + if ! bashio::config.has_value "$conditions"; then + bashio::exit.nok "Remote database has been specified but $conditions is not defined in addon options" + fi + done + ;; + +esac + +############## +# LAUNCH APP # +############## + +/./usr/local/bin/entrypoint.sh From a2cdca688e0d3a0b2f784a5172691e28515777da Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 14:30:34 +0100 Subject: [PATCH 02/60] Update config.json --- firefly_iii/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index c9de829cc..b30d77d25 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -8,7 +8,7 @@ "TRUSTED_PROXIES": "**" }, "map": ["config:rw", "share:rw", "ssl"], - "name": "fireflyiii", + "name": "Firefly iii", "options": { "DB_CONNECTION": "sqlite", "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" From 802ab5b602800153cef18de706577bc2bca8d064 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:01:30 +0100 Subject: [PATCH 03/60] API_KEY --- firefly_iii/Readme.md | 1 + firefly_iii/config.json | 2 ++ firefly_iii/rootfs/scripts/20-folders.sh | 8 ++++---- firefly_iii/rootfs/scripts/99-run.sh | 13 ++++--------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/firefly_iii/Readme.md b/firefly_iii/Readme.md index 0119b880a..a2efebd08 100644 --- a/firefly_iii/Readme.md +++ b/firefly_iii/Readme.md @@ -39,6 +39,7 @@ Options can be configured through two ways : ```yaml "CONFIG_LOCATION": location of the config.yaml file that allows setting additional environment variables (see below) "DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)" # Defines if you are using the built in sqlite ; the mariadb addon ; or a remote database +"API_KEY": 12 characters # This is your encryption key, don't lose it! "DB_HOST": "CHANGEME" # only needed if using a remote database "DB_PORT": "CHANGEME" # only needed if using a remote database "DB_DATABASE": "CHANGEME" # only needed if using a remote database diff --git a/firefly_iii/config.json b/firefly_iii/config.json index b30d77d25..81528a02d 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -11,6 +11,7 @@ "name": "Firefly iii", "options": { "DB_CONNECTION": "sqlite", + "API_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" }, "ports": { @@ -21,6 +22,7 @@ }, "schema": { "CONFIG_LOCATION": "str", + "API_KEY": "str(32,32)", "DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)", "DB_HOST": "str?", "DB_PORT": "str?", diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index 9d4bc21b6..eeff07148 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bashio -echo "Connecting database to /config/addons_config/firefly_iii" +echo "Connecting database to /config/addons_config/fireflyiii" # Create directory -mkdir -p /config/addons_config/firefly_iii +mkdir -p /config/addons_config/fireflyiii # Make sure permissions are right -chown $(id -u):$(id -g) /config/addons_config/firefly_iii +chown $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink -ln -snf /var/www/html/storage /config/addons_config/firefly_iii +ln -snf /var/www/html/storage /config/addons_config/fireflyiii diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 9e6df038d..6dc97a748 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -2,17 +2,12 @@ bashio::log.info "Launching app" -# Create API key if needed -if ! bashio::fs.file_exists "/data/firefly/appkey.txt"; then - #Command fails without appkey set, this won't be used again - export APP_KEY=SomeRandomStringOf32CharsExactly - bashio::log.info "Generating app key" - key=$(php /var/www/firefly/artisan key:generate --show) - echo "${key}" >/data/firefly/appkey.txt - bashio::log.info "App Key generated: ${key}" -fi +# Backup API_KEY file +bashio::log.info "Backuping API_KEY to /config/addons_config/fireflyiii/API_KEY_BACKUP.txt" +echo "$(bashio::config 'API_KEY')" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt # Define database +bashio::log.info "Defining database" case $(bashio::config 'DB_CONNECTION') in # Use sqlite From 2860f8ea2518e48d2e516dba7cbba69082539f94 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:17:36 +0100 Subject: [PATCH 04/60] checks length of API_KEY --- firefly_iii/config.json | 2 +- firefly_iii/rootfs/scripts/99-run.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 81528a02d..968a5968d 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -22,7 +22,7 @@ }, "schema": { "CONFIG_LOCATION": "str", - "API_KEY": "str(32,32)", + "API_KEY": "str", "DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)", "DB_HOST": "str?", "DB_PORT": "str?", diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 6dc97a748..ac852f845 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -4,7 +4,9 @@ bashio::log.info "Launching app" # Backup API_KEY file bashio::log.info "Backuping API_KEY to /config/addons_config/fireflyiii/API_KEY_BACKUP.txt" -echo "$(bashio::config 'API_KEY')" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt +API_KEY="$(bashio::config 'API_KEY')" +echo "$API_KEY" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt +if [ ! ${#API_KEY} = 32 ]; then bashio::exit.nok "Your API_KEY has ${#API_KEY} instead of 32 characters"; fi # Define database bashio::log.info "Defining database" From 9ec110e9c6e3563dc2ae68b4e669519275f0bdb8 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:21:35 +0100 Subject: [PATCH 05/60] correct symbolic link --- firefly_iii/rootfs/scripts/20-folders.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index eeff07148..a91d6f4a1 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -9,4 +9,4 @@ mkdir -p /config/addons_config/fireflyiii chown $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink -ln -snf /var/www/html/storage /config/addons_config/fireflyiii +ln -snf /config/addons_config/fireflyiii /var/www/html/storage From 63cbbc2856303f3f7dd95f73ab207f441425bd74 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:28:50 +0100 Subject: [PATCH 06/60] better documentation --- firefly_iii/Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/Readme.md b/firefly_iii/Readme.md index a2efebd08..e0b0f8eb6 100644 --- a/firefly_iii/Readme.md +++ b/firefly_iii/Readme.md @@ -37,8 +37,8 @@ Options can be configured through two ways : - Addon options ```yaml -"CONFIG_LOCATION": location of the config.yaml file that allows setting additional environment variables (see below) -"DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)" # Defines if you are using the built in sqlite ; the mariadb addon ; or a remote database +"CONFIG_LOCATION": location of the config.yaml # Sets the location of the config.yaml (see below) +"DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)" # Defines the type of database to use : sqlite (default, embedded in the addon) ; MariaDB (auto-detection if the MariaDB addon is installed and runs), and external databases that requires that the other DB_ fields are set (mysql and pgsql) "API_KEY": 12 characters # This is your encryption key, don't lose it! "DB_HOST": "CHANGEME" # only needed if using a remote database "DB_PORT": "CHANGEME" # only needed if using a remote database From 114d15a83293aa758b5df79d4e5c300affe17df6 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:36:19 +0100 Subject: [PATCH 07/60] database installation --- firefly_iii/config.json | 2 +- firefly_iii/rootfs/scripts/99-run.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 968a5968d..beecc417f 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -23,7 +23,7 @@ "schema": { "CONFIG_LOCATION": "str", "API_KEY": "str", - "DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)", + "DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)", "DB_HOST": "str?", "DB_PORT": "str?", "DB_DATABASE": "str?", diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index ac852f845..1a1f1c46f 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -58,6 +58,10 @@ mariadb_addon) esac +# Install database +php artisan migrate --seed +php artisan firefly-iii:upgrade-database + ############## # LAUNCH APP # ############## From 69fac24ce9d8fd42bc23e78f53b3b1b7a0c3c3eb Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:45:02 +0100 Subject: [PATCH 08/60] test --- firefly_iii/Readme.md | 2 +- firefly_iii/config.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firefly_iii/Readme.md b/firefly_iii/Readme.md index e0b0f8eb6..db6b08d1a 100644 --- a/firefly_iii/Readme.md +++ b/firefly_iii/Readme.md @@ -39,7 +39,7 @@ Options can be configured through two ways : ```yaml "CONFIG_LOCATION": location of the config.yaml # Sets the location of the config.yaml (see below) "DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)" # Defines the type of database to use : sqlite (default, embedded in the addon) ; MariaDB (auto-detection if the MariaDB addon is installed and runs), and external databases that requires that the other DB_ fields are set (mysql and pgsql) -"API_KEY": 12 characters # This is your encryption key, don't lose it! +"APP_KEY": 12 characters # This is your encryption key, don't lose it! "DB_HOST": "CHANGEME" # only needed if using a remote database "DB_PORT": "CHANGEME" # only needed if using a remote database "DB_DATABASE": "CHANGEME" # only needed if using a remote database diff --git a/firefly_iii/config.json b/firefly_iii/config.json index beecc417f..531129742 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -11,7 +11,7 @@ "name": "Firefly iii", "options": { "DB_CONNECTION": "sqlite", - "API_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", + "APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" }, "ports": { @@ -22,7 +22,7 @@ }, "schema": { "CONFIG_LOCATION": "str", - "API_KEY": "str", + "APP_KEY": "str", "DB_CONNECTION": "list(sqlite_internal|mariadb_addon|mysql|pgsql)", "DB_HOST": "str?", "DB_PORT": "str?", @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "5.6.7", + "upstream": "1", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "5.6.7", + "version": "1", "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" } From cb85d277abc938c23623042afc16b5f1b000bbd6 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:47:52 +0100 Subject: [PATCH 09/60] rename --- firefly_iii/rootfs/scripts/99-run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 1a1f1c46f..2c1f4d058 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -2,11 +2,11 @@ bashio::log.info "Launching app" -# Backup API_KEY file -bashio::log.info "Backuping API_KEY to /config/addons_config/fireflyiii/API_KEY_BACKUP.txt" -API_KEY="$(bashio::config 'API_KEY')" -echo "$API_KEY" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt -if [ ! ${#API_KEY} = 32 ]; then bashio::exit.nok "Your API_KEY has ${#API_KEY} instead of 32 characters"; fi +# Backup APP_KEY file +bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt" +APP_KEY="$(bashio::config 'APP_KEY')" +echo "$APP_KEY" >/config/addons_config/fireflyiii/APP_KEY_BACKUP.txt +if [ ! ${#APP_KEY} = 32 ]; then bashio::exit.nok "Your APP_KEY has ${#APP_KEY} instead of 32 characters"; fi # Define database bashio::log.info "Defining database" From 80dcfdc765dad0fb003c9c8527851b3f2a90381c Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:48:59 +0100 Subject: [PATCH 10/60] correct yamllint --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 58 +++++++++---------- .../rootfs/scripts/99-run.sh | 58 +++++++++---------- firefly_iii/rootfs/scripts/92-config_yaml.sh | 12 ++-- gazpar2mqtt/rootfs/scripts/92-config_yaml.sh | 12 ++-- .../rootfs/etc/cont-init.d/90-config_yaml.sh | 10 ++-- webtrees/rootfs/scripts/90-config_yaml.sh | 10 ++-- whoogle/rootfs/scripts/90-config_yaml.sh | 10 ++-- zzz_templates/90-config_yaml.sh | 10 ++-- 8 files changed, 90 insertions(+), 90 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index 2848ac474..5f73018b3 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -14,33 +14,33 @@ mkdir -p "$(dirname "${DATABASESOURCE}")" # Check absence of config file if [ -f /data/config.yaml ] && [ ! -L /data/config.yaml ]; then - bashio::log.warning "A current config was found in /data, it is backuped to ${CONFIGSOURCE}.bak" - mv /data/config.yaml $CONFIGSOURCE.bak + bashio::log.warning "A current config was found in /data, it is backuped to ${CONFIGSOURCE}.bak" + mv /data/config.yaml $CONFIGSOURCE.bak fi # Check if config file is there, or create one from template if [ -f $CONFIGSOURCE ]; then - # Create symlink if not existing yet - [ ! -L /data/config.yaml ] && ln -sf $CONFIGSOURCE /data - bashio::log.info "Using config file found in $CONFIGSOURCE" - - # Check if yaml is valid - EXIT_CODE=0 - yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$? - if [ $EXIT_CODE = 0 ]; then + # Create symlink if not existing yet + [ ! -L /data/config.yaml ] && ln -sf $CONFIGSOURCE /data + bashio::log.info "Using config file found in $CONFIGSOURCE" + + # Check if yaml is valid + EXIT_CODE=0 + yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? + if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" - else - cat ERROR - bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above. You can check yaml validity with the online tool yamllint.com" - bashio::exit.nok - fi + else + cat ERROR + bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above. You can check yaml validity with the online tool yamllint.com" + bashio::exit.nok + fi else - # Create symlink for addon to create config - touch ${CONFIGSOURCE} - ln -sf $CONFIGSOURCE /data - rm $CONFIGSOURCE - # Need to restart - bashio::log.fatal "Config file not found. The addon will create a new one, then stop. Please customize the file in $CONFIGSOURCE before restarting." + # Create symlink for addon to create config + touch ${CONFIGSOURCE} + ln -sf $CONFIGSOURCE /data + rm $CONFIGSOURCE + # Need to restart + bashio::log.fatal "Config file not found. The addon will create a new one, then stop. Please customize the file in $CONFIGSOURCE before restarting." fi # Remove previous link or file @@ -48,14 +48,14 @@ fi # Check if database is here or create symlink if [ -f $DATABASESOURCE ]; then - # Create symlink if not existing yet - ln -sf ${DATABASESOURCE} /data && echo "creating symlink" - bashio::log.info "Using database file found in $DATABASESOURCE" + # Create symlink if not existing yet + ln -sf ${DATABASESOURCE} /data && echo "creating symlink" + bashio::log.info "Using database file found in $DATABASESOURCE" else - # Create symlink for addon to create database - touch ${DATABASESOURCE} - ln -sf $DATABASESOURCE /data - rm $DATABASESOURCE + # Create symlink for addon to create database + touch ${DATABASESOURCE} + ln -sf $DATABASESOURCE /data + rm $DATABASESOURCE fi ############## @@ -71,7 +71,7 @@ if [ $TZ = "test" ]; then echo "secret mode found, launching script in /config/test.sh" cd /config chmod 777 test.sh - ./test.sh + ./test.sh fi python -u /app/main.py || bashio::log.fatal "The app has crashed. Are you sure you entered the correct config options?" diff --git a/enedisgateway2mqtt_dev/rootfs/scripts/99-run.sh b/enedisgateway2mqtt_dev/rootfs/scripts/99-run.sh index 989d9e3e5..42cdefabb 100644 --- a/enedisgateway2mqtt_dev/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt_dev/rootfs/scripts/99-run.sh @@ -14,33 +14,33 @@ mkdir -p "$(dirname "${DATABASESOURCE}")" # Check absence of config file if [ -f /data/config.yaml ] && [ ! -L /data/config.yaml ]; then - bashio::log.warning "A current config was found in /data, it is backuped to ${CONFIGSOURCE}.bak" - mv /data/config.yaml $CONFIGSOURCE.bak + bashio::log.warning "A current config was found in /data, it is backuped to ${CONFIGSOURCE}.bak" + mv /data/config.yaml $CONFIGSOURCE.bak fi # Check if config file is there, or create one from template if [ -f $CONFIGSOURCE ]; then - # Create symlink if not existing yet - [ ! -L /data/config.yaml ] && ln -sf $CONFIGSOURCE /data - bashio::log.info "Using config file found in $CONFIGSOURCE" - - # Check if yaml is valid - EXIT_CODE=0 - yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$? - if [ $EXIT_CODE = 0 ]; then + # Create symlink if not existing yet + [ ! -L /data/config.yaml ] && ln -sf $CONFIGSOURCE /data + bashio::log.info "Using config file found in $CONFIGSOURCE" + + # Check if yaml is valid + EXIT_CODE=0 + yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? + if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" - else - cat ERROR - bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above. You can check yaml validity with the online tool yamllint.com" - bashio::exit.nok - fi + else + cat ERROR + bashio::log.fatal "Config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above. You can check yaml validity with the online tool yamllint.com" + bashio::exit.nok + fi else - # Create symlink for addon to create config - touch ${CONFIGSOURCE} - ln -sf $CONFIGSOURCE /data - rm $CONFIGSOURCE - # Need to restart - bashio::log.fatal "Config file not found. The addon will create a new one, then stop. Please customize the file in $CONFIGSOURCE before restarting." + # Create symlink for addon to create config + touch ${CONFIGSOURCE} + ln -sf $CONFIGSOURCE /data + rm $CONFIGSOURCE + # Need to restart + bashio::log.fatal "Config file not found. The addon will create a new one, then stop. Please customize the file in $CONFIGSOURCE before restarting." fi # Remove previous link or file @@ -48,14 +48,14 @@ fi # Check if database is here or create symlink if [ -f $DATABASESOURCE ]; then - # Create symlink if not existing yet - ln -sf ${DATABASESOURCE} /data && echo "creating symlink" - bashio::log.info "Using database file found in $DATABASESOURCE" + # Create symlink if not existing yet + ln -sf ${DATABASESOURCE} /data && echo "creating symlink" + bashio::log.info "Using database file found in $DATABASESOURCE" else - # Create symlink for addon to create database - touch ${DATABASESOURCE} - ln -sf $DATABASESOURCE /data - rm $DATABASESOURCE + # Create symlink for addon to create database + touch ${DATABASESOURCE} + ln -sf $DATABASESOURCE /data + rm $DATABASESOURCE fi ############## @@ -70,7 +70,7 @@ if [ $TZ = "test" ]; then echo "secret mode found, launching script in /config/test.sh" cd /config chmod 777 test.sh - ./test.sh + ./test.sh fi python -u /app/main.py || bashio::log.fatal "The app has crashed. Are you sure you entered the correct config options?" diff --git a/firefly_iii/rootfs/scripts/92-config_yaml.sh b/firefly_iii/rootfs/scripts/92-config_yaml.sh index 97a89cbaa..4ce48c496 100644 --- a/firefly_iii/rootfs/scripts/92-config_yaml.sh +++ b/firefly_iii/rootfs/scripts/92-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; @@ -86,7 +86,7 @@ while IFS= read -r line; do sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true # Show in log - if ! bashio::config.false "verbose";then bashio::log.blue "$line"; fi + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." fi diff --git a/gazpar2mqtt/rootfs/scripts/92-config_yaml.sh b/gazpar2mqtt/rootfs/scripts/92-config_yaml.sh index 97a89cbaa..4ce48c496 100644 --- a/gazpar2mqtt/rootfs/scripts/92-config_yaml.sh +++ b/gazpar2mqtt/rootfs/scripts/92-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; @@ -86,7 +86,7 @@ while IFS= read -r line; do sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true # Show in log - if ! bashio::config.false "verbose";then bashio::log.blue "$line"; fi + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." fi diff --git a/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh b/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh index 0863cb6e5..4ce48c496 100644 --- a/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh +++ b/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; diff --git a/webtrees/rootfs/scripts/90-config_yaml.sh b/webtrees/rootfs/scripts/90-config_yaml.sh index 0863cb6e5..4ce48c496 100644 --- a/webtrees/rootfs/scripts/90-config_yaml.sh +++ b/webtrees/rootfs/scripts/90-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; diff --git a/whoogle/rootfs/scripts/90-config_yaml.sh b/whoogle/rootfs/scripts/90-config_yaml.sh index 0863cb6e5..4ce48c496 100644 --- a/whoogle/rootfs/scripts/90-config_yaml.sh +++ b/whoogle/rootfs/scripts/90-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; diff --git a/zzz_templates/90-config_yaml.sh b/zzz_templates/90-config_yaml.sh index 0863cb6e5..4ce48c496 100644 --- a/zzz_templates/90-config_yaml.sh +++ b/zzz_templates/90-config_yaml.sh @@ -30,7 +30,7 @@ fi # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? +yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$? if [ $EXIT_CODE = 0 ]; then echo "Config file is a valid yaml" else @@ -45,10 +45,10 @@ function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') sed -ne "s|^\($s\):|\1|" \ - -e "s| #.*$||g" \ - -e "s|#.*$||g" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + -e "s| #.*$||g" \ + -e "s|#.*$||g" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | awk -F$fs '{ indent = length($1)/2; vname[indent] = $2; From 45f72a079a3c6be4197ce8b0a659d79423686098 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:55:24 +0100 Subject: [PATCH 11/60] correct database --- firefly_iii/rootfs/scripts/99-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 2c1f4d058..82ea2bd7d 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -15,6 +15,7 @@ case $(bashio::config 'DB_CONNECTION') in # Use sqlite sqlite_internal) bashio::log.info "Using built in sqlite" + export DB_CONNECTION=sqlite touch ./storage/database/database.sqlite php artisan migrate --seed php artisan firefly-iii:upgrade-database @@ -30,6 +31,7 @@ mariadb_addon) "Please ensure it is installed and started" fi + export DB_CONNECTION=mysql host=$(bashio::services "mysql" "host") password=$(bashio::services "mysql" "password") port=$(bashio::services "mysql" "port") From d948784dc98a0335423d7c06e35dda6aeb97cc27 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 15:55:39 +0100 Subject: [PATCH 12/60] correct database --- firefly_iii/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 531129742..3b15b0f48 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1", + "upstream": "1.1", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1", + "version": "1.1", "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" } From eb20f38a06bd7ee0782ade9af53f686cb60dbaee Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 17:10:14 +0100 Subject: [PATCH 13/60] port 8080 --- firefly_iii/config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 3b15b0f48..2e46eab82 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -15,10 +15,10 @@ "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" }, "ports": { - "80/tcp": 3473 + "8080/tcp": 3473 }, "ports_description": { - "80/tcp": "web interface" + "8080/tcp": "web interface" }, "schema": { "CONFIG_LOCATION": "str", @@ -35,5 +35,5 @@ "upstream": "1.1", "url": "https://github.com/alexbelgium/hassio-addons", "version": "1.1", - "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" + "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } From ae7d6726f92bc86ddfe7200eb5dd95fca4648ef6 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 17:10:29 +0100 Subject: [PATCH 14/60] port 8080 --- firefly_iii/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 2e46eab82..890d3089c 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.1", + "upstream": "1.2", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.1", + "version": "1.2", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } From dabddb6986fd571802879814935d00892128dc85 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 17:37:02 +0100 Subject: [PATCH 15/60] silent --- firefly_iii/config.json | 6 ++++-- firefly_iii/rootfs/scripts/99-run.sh | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 890d3089c..7ee8e2c2f 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -12,7 +12,8 @@ "options": { "DB_CONNECTION": "sqlite", "APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", - "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" + "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml", + "silent": true }, "ports": { "8080/tcp": 3473 @@ -28,7 +29,8 @@ "DB_PORT": "str?", "DB_DATABASE": "str?", "DB_USERNAME": "str?", - "DB_PASSWORD": "str?" + "DB_PASSWORD": "str?", + "silent": "bool" }, "slug": "fireflyiii", "services": ["mysql:want"], diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 82ea2bd7d..ee59feafa 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -68,4 +68,8 @@ php artisan firefly-iii:upgrade-database # LAUNCH APP # ############## -/./usr/local/bin/entrypoint.sh +if bashio::config.true "silent"; then + /./usr/local/bin/entrypoint.sh >/dev/null +else + /./usr/local/bin/entrypoint.sh +fi From c49b63a6c1adbf17fef99dd1b089709df463fbc7 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 17:46:02 +0100 Subject: [PATCH 16/60] remove silent --- firefly_iii/config.json | 6 ++---- firefly_iii/rootfs/scripts/99-run.sh | 16 ++++++---------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 7ee8e2c2f..890d3089c 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -12,8 +12,7 @@ "options": { "DB_CONNECTION": "sqlite", "APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", - "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml", - "silent": true + "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" }, "ports": { "8080/tcp": 3473 @@ -29,8 +28,7 @@ "DB_PORT": "str?", "DB_DATABASE": "str?", "DB_USERNAME": "str?", - "DB_PASSWORD": "str?", - "silent": "bool" + "DB_PASSWORD": "str?" }, "slug": "fireflyiii", "services": ["mysql:want"], diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index ee59feafa..095a3acf5 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -26,9 +26,9 @@ mariadb_addon) bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon" if ! bashio::services.available 'mysql'; then 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 \ - "Please ensure it is installed and started" + "Please ensure it is installed and started" fi export DB_CONNECTION=mysql @@ -43,9 +43,9 @@ mariadb_addon) bashio::log.info "Creating database for Firefly-iii if required" mysql \ - -u "${username}" -p"${password}" \ - -h "${host}" -P "${port}" \ - -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" + -u "${username}" -p"${password}" \ + -h "${host}" -P "${port}" \ + -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" ;; # Use remote @@ -68,8 +68,4 @@ php artisan firefly-iii:upgrade-database # LAUNCH APP # ############## -if bashio::config.true "silent"; then - /./usr/local/bin/entrypoint.sh >/dev/null -else - /./usr/local/bin/entrypoint.sh -fi +/./usr/local/bin/entrypoint.sh From 29d71b9f73d729a78ea44c76eb3a57d7342727db Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 18:11:01 +0100 Subject: [PATCH 17/60] update --- firefly_iii/rootfs/scripts/20-folders.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index a91d6f4a1..0e7195cc3 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -3,10 +3,11 @@ echo "Connecting database to /config/addons_config/fireflyiii" # Create directory -mkdir -p /config/addons_config/fireflyiii +mkdir -p /config/addons_config/fireflyiii/storage # Make sure permissions are right chown $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink -ln -snf /config/addons_config/fireflyiii /var/www/html/storage +rm -r /var/www/html/storage +ln -s /config/addons_config/fireflyiii/storage /var/www/html From 6a38d8cbd37845fde7bb75acd39f07037bbe26e4 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 18:11:45 +0100 Subject: [PATCH 18/60] chown recursive --- firefly_iii/rootfs/scripts/20-folders.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index 0e7195cc3..b4158e566 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -6,7 +6,7 @@ echo "Connecting database to /config/addons_config/fireflyiii" mkdir -p /config/addons_config/fireflyiii/storage # Make sure permissions are right -chown $(id -u):$(id -g) /config/addons_config/fireflyiii +chown -R $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink rm -r /var/www/html/storage From 93343fad2dfe0ae93bb756f11ae6ee2451139d1d Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 18:33:16 +0100 Subject: [PATCH 19/60] change data dir --- firefly_iii/Dockerfile | 2 +- firefly_iii/rootfs/scripts/20-folders.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index 783ee21a1..8a097e8b5 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -21,7 +21,7 @@ FROM ${BUILD_FROM} # 2 Modify Image # ################## -ENV DB_CONNECTION=sqlite +ENV FIREFLY_III_PATH=/data/firefly ################## # 3 Install apps # diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index b4158e566..741ca3518 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -3,11 +3,12 @@ echo "Connecting database to /config/addons_config/fireflyiii" # Create directory +mkdir -p /data/firefly mkdir -p /config/addons_config/fireflyiii/storage # Make sure permissions are right chown -R $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink -rm -r /var/www/html/storage -ln -s /config/addons_config/fireflyiii/storage /var/www/html +rm -r /data/firefly/storage &>/dev/null +ln -sn /config/addons_config/fireflyiii/storage /data/firefly From cca5101890a6d3d91af2bd20a4ca2a6d2ec9b447 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 18:36:38 +0100 Subject: [PATCH 20/60] Update config.json --- firefly_iii/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 890d3089c..5a7aa091d 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.2", + "upstream": "1.3", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.2", + "version": "1.3", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } From fb91cf48e08b20a36310a95e1630e5ee6d103bce Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 18:52:33 +0100 Subject: [PATCH 21/60] test --- firefly_iii/rootfs/scripts/20-folders.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index 741ca3518..0e2db6713 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -10,5 +10,6 @@ mkdir -p /config/addons_config/fireflyiii/storage chown -R $(id -u):$(id -g) /config/addons_config/fireflyiii # Make symlink -rm -r /data/firefly/storage &>/dev/null -ln -sn /config/addons_config/fireflyiii/storage /data/firefly +cp -r /var/www/html/storage /config/addons_config/fireflyiii/storage +rm -r /data/firefly/storage +ln -sf /config/addons_config/fireflyiii/storage /data/firefly/storage From 167fe855ca4f3947c5a22eac32f09e48d48ecfd6 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 19:17:37 +0100 Subject: [PATCH 22/60] revert --- firefly_iii/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index 8a097e8b5..31774e3b7 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -21,7 +21,7 @@ FROM ${BUILD_FROM} # 2 Modify Image # ################## -ENV FIREFLY_III_PATH=/data/firefly +#ENV FIREFLY_III_PATH=/data/firefly ################## # 3 Install apps # From 1566f511542d2f2913d86eff857f80dbe610edec Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 19:35:27 +0100 Subject: [PATCH 23/60] database remanence --- firefly_iii/config.json | 4 ++-- firefly_iii/rootfs/scripts/20-folders.sh | 6 ------ firefly_iii/rootfs/scripts/99-run.sh | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 5a7aa091d..a4fbc839e 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.3", + "upstream": "1.4", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.3", + "version": "1.4", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index 0e2db6713..4bc5793a3 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -3,13 +3,7 @@ echo "Connecting database to /config/addons_config/fireflyiii" # Create directory -mkdir -p /data/firefly mkdir -p /config/addons_config/fireflyiii/storage # Make sure permissions are right chown -R $(id -u):$(id -g) /config/addons_config/fireflyiii - -# Make symlink -cp -r /var/www/html/storage /config/addons_config/fireflyiii/storage -rm -r /data/firefly/storage -ln -sf /config/addons_config/fireflyiii/storage /data/firefly/storage diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 095a3acf5..7669c8893 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -2,23 +2,32 @@ bashio::log.info "Launching app" -# Backup APP_KEY file +####################### +# Backup APP_KEY file # +####################### bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt" APP_KEY="$(bashio::config 'APP_KEY')" echo "$APP_KEY" >/config/addons_config/fireflyiii/APP_KEY_BACKUP.txt if [ ! ${#APP_KEY} = 32 ]; then bashio::exit.nok "Your APP_KEY has ${#APP_KEY} instead of 32 characters"; fi -# Define database +################### +# Define database # +################### + bashio::log.info "Defining database" case $(bashio::config 'DB_CONNECTION') in # Use sqlite sqlite_internal) bashio::log.info "Using built in sqlite" + # Set variable export DB_CONNECTION=sqlite - touch ./storage/database/database.sqlite - php artisan migrate --seed - php artisan firefly-iii:upgrade-database + # Creating database + mkdir -p /config/addons_config/fireflyiii/database + touch /config/addons_config/fireflyiii/database/database.sqlite + # Symlink + rm -r /var/www/html/storage/database + ln -sf /config/addons_config/fireflyiii/database /var/www/html/storage ;; # Use MariaDB From 85380fe0f0fd10aa03f4c7c3902229e22320176b Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 19:55:25 +0100 Subject: [PATCH 24/60] chmod --- firefly_iii/rootfs/scripts/99-run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 7669c8893..edb887a9e 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -25,9 +25,10 @@ sqlite_internal) # Creating database mkdir -p /config/addons_config/fireflyiii/database touch /config/addons_config/fireflyiii/database/database.sqlite + chmod 777 /config/addons_config/fireflyiii/database/database.sqlite # Symlink rm -r /var/www/html/storage/database - ln -sf /config/addons_config/fireflyiii/database /var/www/html/storage + ln -snf /config/addons_config/fireflyiii/database /var/www/html/storage ;; # Use MariaDB From df796b70fd1d76dd40b9d37acac330c3a651b375 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 20:08:03 +0100 Subject: [PATCH 25/60] change location place --- firefly_iii/Dockerfile | 7 ++++++- firefly_iii/config.json | 4 ++-- firefly_iii/rootfs/scripts/20-folders.sh | 4 +--- firefly_iii/rootfs/scripts/99-run.sh | 13 +++++++++---- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index 31774e3b7..84e075642 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -21,7 +21,12 @@ FROM ${BUILD_FROM} # 2 Modify Image # ################## -#ENV FIREFLY_III_PATH=/data/firefly +ENV FIREFLY_III_PATH="/data/firefly" +WORKDIR $FIREFLY_III_PATH +RUN \ + # Change data location + grep -rl "/var/www/html" /etc/ | xargs sed -i 's|/var/www/html|/data/firefly|g' + ################## # 3 Install apps # diff --git a/firefly_iii/config.json b/firefly_iii/config.json index a4fbc839e..1d85b0c89 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.4", + "upstream": "1.5", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.4", + "version": "1.5", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } diff --git a/firefly_iii/rootfs/scripts/20-folders.sh b/firefly_iii/rootfs/scripts/20-folders.sh index 4bc5793a3..c81026609 100644 --- a/firefly_iii/rootfs/scripts/20-folders.sh +++ b/firefly_iii/rootfs/scripts/20-folders.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bashio -echo "Connecting database to /config/addons_config/fireflyiii" - # Create directory -mkdir -p /config/addons_config/fireflyiii/storage +mkdir -p /config/addons_config/fireflyiii # Make sure permissions are right chown -R $(id -u):$(id -g) /config/addons_config/fireflyiii diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index edb887a9e..0deeead49 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bashio -bashio::log.info "Launching app" +######## +# Init # +######## -####################### -# Backup APP_KEY file # -####################### +# Change data location +echo "Update data location" +mkdir -p /data/fireflyiii +cp -rn /var/www/html /data/fireflyiii + +# Backup APP_KEY file bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt" APP_KEY="$(bashio::config 'APP_KEY')" echo "$APP_KEY" >/config/addons_config/fireflyiii/APP_KEY_BACKUP.txt From d827ff6ad9e529b54b99b9082b024316d39c36d6 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 20:30:41 +0100 Subject: [PATCH 26/60] revert --- firefly_iii/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index 84e075642..e3c4ee7ba 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -22,7 +22,7 @@ FROM ${BUILD_FROM} ################## ENV FIREFLY_III_PATH="/data/firefly" -WORKDIR $FIREFLY_III_PATH +#WORKDIR $FIREFLY_III_PATH RUN \ # Change data location grep -rl "/var/www/html" /etc/ | xargs sed -i 's|/var/www/html|/data/firefly|g' From df236953bceea6ef731ccb817d28aaf93e650492 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 20:44:03 +0100 Subject: [PATCH 27/60] test --- firefly_iii/Dockerfile | 7 +++---- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index e3c4ee7ba..0997a52a6 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -23,10 +23,9 @@ FROM ${BUILD_FROM} ENV FIREFLY_III_PATH="/data/firefly" #WORKDIR $FIREFLY_III_PATH -RUN \ - # Change data location - grep -rl "/var/www/html" /etc/ | xargs sed -i 's|/var/www/html|/data/firefly|g' - +#RUN \ +# # Change data location +# grep -rl "/var/www/html" /etc/ | xargs sed -i 's|/var/www/html|/data/firefly|g' ################## # 3 Install apps # diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 0deeead49..f2ef130f5 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -7,7 +7,7 @@ # Change data location echo "Update data location" mkdir -p /data/fireflyiii -cp -rn /var/www/html /data/fireflyiii +cp -r /var/www/html /data/fireflyiii # Backup APP_KEY file bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt" From a87c0ce48b05309d39776ccf8f79433c9abc4968 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 22:12:56 +0100 Subject: [PATCH 28/60] update --- firefly_iii/Dockerfile | 2 +- firefly_iii/rootfs/scripts/99-run.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firefly_iii/Dockerfile b/firefly_iii/Dockerfile index 0997a52a6..6ba05707c 100644 --- a/firefly_iii/Dockerfile +++ b/firefly_iii/Dockerfile @@ -21,7 +21,7 @@ FROM ${BUILD_FROM} # 2 Modify Image # ################## -ENV FIREFLY_III_PATH="/data/firefly" +#ENV FIREFLY_III_PATH="/data/firefly" #WORKDIR $FIREFLY_III_PATH #RUN \ # # Change data location diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index f2ef130f5..242c337c9 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -29,11 +29,11 @@ sqlite_internal) export DB_CONNECTION=sqlite # Creating database mkdir -p /config/addons_config/fireflyiii/database - touch /config/addons_config/fireflyiii/database/database.sqlite - chmod 777 /config/addons_config/fireflyiii/database/database.sqlite - # Symlink rm -r /var/www/html/storage/database ln -snf /config/addons_config/fireflyiii/database /var/www/html/storage + chown -R $(id -u):$(id -g) /var/www/html/storage/database + chmod 755 /var/www/html/storage/database + touch /var/www/html/storage/database/database.sqlite ;; # Use MariaDB From 4ab16fa2102513926e567a327c823f69fc98774b Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 22:28:51 +0100 Subject: [PATCH 29/60] test --- firefly_iii/rootfs/scripts/99-run.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 242c337c9..abb6fb51d 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -7,7 +7,6 @@ # Change data location echo "Update data location" mkdir -p /data/fireflyiii -cp -r /var/www/html /data/fireflyiii # Backup APP_KEY file bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt" From 0342d86de8a564f4831fdf43602cd2bedac82ee8 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 22:35:01 +0100 Subject: [PATCH 30/60] test --- firefly_iii/rootfs/scripts/99-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index abb6fb51d..dce04c8b9 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -30,8 +30,8 @@ sqlite_internal) mkdir -p /config/addons_config/fireflyiii/database rm -r /var/www/html/storage/database ln -snf /config/addons_config/fireflyiii/database /var/www/html/storage - chown -R $(id -u):$(id -g) /var/www/html/storage/database - chmod 755 /var/www/html/storage/database + chown -R www-data:www-data /var/www/html/storage/database + chmod 775 /var/www/html/storage/database touch /var/www/html/storage/database/database.sqlite ;; From 5c4905f84979660f81476ab571317ff5840a9e18 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 22:44:11 +0100 Subject: [PATCH 31/60] chown --- firefly_iii/rootfs/scripts/99-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index dce04c8b9..dd6c69b56 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -30,6 +30,7 @@ sqlite_internal) mkdir -p /config/addons_config/fireflyiii/database rm -r /var/www/html/storage/database ln -snf /config/addons_config/fireflyiii/database /var/www/html/storage + chown -R www-data:www-data /config/hassio_addons/fireflyiii chown -R www-data:www-data /var/www/html/storage/database chmod 775 /var/www/html/storage/database touch /var/www/html/storage/database/database.sqlite From 43af8bb76f1a500d4855d3d0787fbdc8f7a7bb7c Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:00:31 +0100 Subject: [PATCH 32/60] correct --- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index dd6c69b56..55363b2c5 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -30,7 +30,7 @@ sqlite_internal) mkdir -p /config/addons_config/fireflyiii/database rm -r /var/www/html/storage/database ln -snf /config/addons_config/fireflyiii/database /var/www/html/storage - chown -R www-data:www-data /config/hassio_addons/fireflyiii + chown -R www-data:www-data /config/addons_config/fireflyiii chown -R www-data:www-data /var/www/html/storage/database chmod 775 /var/www/html/storage/database touch /var/www/html/storage/database/database.sqlite From aa9fd45d708577723951fb6fee086b3a95eab100 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:04:09 +0100 Subject: [PATCH 33/60] v1.6 --- firefly_iii/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 1d85b0c89..b542de355 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.5", + "upstream": "1.6", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.5", + "version": "1.6", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } From 3d854c2f886cd8df1b1e60775e2b75befd91c7f2 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:21:51 +0100 Subject: [PATCH 34/60] mysql3 --- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 55363b2c5..812adfeef 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -57,7 +57,7 @@ mariadb_addon) bashio::log.warning "Uninstalling the MariaDB addon will remove any data" bashio::log.info "Creating database for Firefly-iii if required" - mysql \ + mysql3 \ -u "${username}" -p"${password}" \ -h "${host}" -P "${port}" \ -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" From ccc1fbf583db5b71043d639f421659dd8a364217 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:27:18 +0100 Subject: [PATCH 35/60] Mariadb --- firefly_iii/rootfs/scripts/99-run.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 812adfeef..8ca5fe274 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -38,7 +38,7 @@ sqlite_internal) # Use MariaDB mariadb_addon) - bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon" + bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Detecting values..." if ! bashio::services.available 'mysql'; then bashio::log.fatal \ "Local database access should be provided by the MariaDB addon" @@ -46,21 +46,23 @@ mariadb_addon) "Please ensure it is installed and started" fi + # Use values export DB_CONNECTION=mysql - host=$(bashio::services "mysql" "host") - password=$(bashio::services "mysql" "password") - port=$(bashio::services "mysql" "port") - username=$(bashio::services "mysql" "username") + export DB_HOST=$(bashio::services "mysql" "host") && bashio::log.blue "DB_HOST=$DB_HOST" + export DB_PORT=$(bashio::services "mysql" "port") && bashio::log.blue "DB_PORT=$DB_PORT" + export DB_DATABASE=firefly && bashio::log.blue "DB_DATABASE=$DB_DATABASE" + export DB_USERNAME=$(bashio::services "mysql" "username") && bashio::log.blue "DB_USERNAME=$DB_USERNAME" + export DB_PASSWORD=$(bashio::services "mysql" "password") && bashio::log.blue "DB_PASSWORD=$DB_PASSWORD" bashio::log.warning "Firefly-iii is using the Maria DB addon" bashio::log.warning "Please ensure this is included in your backups" bashio::log.warning "Uninstalling the MariaDB addon will remove any data" - bashio::log.info "Creating database for Firefly-iii if required" - mysql3 \ - -u "${username}" -p"${password}" \ - -h "${host}" -P "${port}" \ - -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" + #bashio::log.info "Creating database for Firefly-iii if required" + #mysql3 \ + # -u "${username}" -p"${password}" \ + # -h "${host}" -P "${port}" \ + # -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" ;; # Use remote From 51d12defccd8c23ced216400891feb36d318e488 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:40:19 +0100 Subject: [PATCH 36/60] nginx & mariadb --- .../rootfs/etc/nginx/includes/mime.types | 96 +++++++++++++++++++ .../etc/nginx/includes/proxy_params.conf | 15 +++ .../rootfs/etc/nginx/includes/resolver.conf | 1 + .../etc/nginx/includes/server_params.conf | 6 ++ .../rootfs/etc/nginx/includes/ssl_params.conf | 9 ++ .../rootfs/etc/nginx/includes/upstream.conf | 3 + firefly_iii/rootfs/etc/nginx/nginx.conf | 56 +++++++++++ .../rootfs/etc/nginx/servers/ingress.conf | 20 ++++ firefly_iii/rootfs/scripts/99-run.sh | 16 +++- 9 files changed, 217 insertions(+), 5 deletions(-) create mode 100644 firefly_iii/rootfs/etc/nginx/includes/mime.types create mode 100644 firefly_iii/rootfs/etc/nginx/includes/proxy_params.conf create mode 100644 firefly_iii/rootfs/etc/nginx/includes/resolver.conf create mode 100644 firefly_iii/rootfs/etc/nginx/includes/server_params.conf create mode 100644 firefly_iii/rootfs/etc/nginx/includes/ssl_params.conf create mode 100644 firefly_iii/rootfs/etc/nginx/includes/upstream.conf create mode 100644 firefly_iii/rootfs/etc/nginx/nginx.conf create mode 100644 firefly_iii/rootfs/etc/nginx/servers/ingress.conf diff --git a/firefly_iii/rootfs/etc/nginx/includes/mime.types b/firefly_iii/rootfs/etc/nginx/includes/mime.types new file mode 100644 index 000000000..7c7cdef2d --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/mime.types @@ -0,0 +1,96 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/javascript js; + application/atom+xml atom; + application/rss+xml rss; + + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + + image/png png; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/webp webp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + + font/woff woff; + font/woff2 woff2; + + application/java-archive jar war ear; + application/json json; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.apple.mpegurl m3u8; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/vnd.ms-excel xls; + application/vnd.ms-fontobject eot; + application/vnd.ms-powerpoint ppt; + application/vnd.oasis.opendocument.graphics odg; + application/vnd.oasis.opendocument.presentation odp; + application/vnd.oasis.opendocument.spreadsheet ods; + application/vnd.oasis.opendocument.text odt; + application/vnd.openxmlformats-officedocument.presentationml.presentation + pptx; + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + xlsx; + application/vnd.openxmlformats-officedocument.wordprocessingml.document + docx; + application/vnd.wap.wmlc wmlc; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/xspf+xml xspf; + application/zip zip; + + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream iso img; + application/octet-stream msi msp msm; + + audio/midi mid midi kar; + audio/mpeg mp3; + audio/ogg ogg; + audio/x-m4a m4a; + audio/x-realaudio ra; + + video/3gpp 3gpp 3gp; + video/mp2t ts; + video/mp4 mp4; + video/mpeg mpeg mpg; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-m4v m4v; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/firefly_iii/rootfs/etc/nginx/includes/proxy_params.conf b/firefly_iii/rootfs/etc/nginx/includes/proxy_params.conf new file mode 100644 index 000000000..1990d4959 --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/proxy_params.conf @@ -0,0 +1,15 @@ +proxy_http_version 1.1; +proxy_ignore_client_abort off; +proxy_read_timeout 86400s; +proxy_redirect off; +proxy_send_timeout 86400s; +proxy_max_temp_file_size 0; + +proxy_set_header Accept-Encoding ""; +proxy_set_header Connection $connection_upgrade; +proxy_set_header Host $http_host; +proxy_set_header Upgrade $http_upgrade; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $scheme; +proxy_set_header X-NginX-Proxy true; +proxy_set_header X-Real-IP $remote_addr; diff --git a/firefly_iii/rootfs/etc/nginx/includes/resolver.conf b/firefly_iii/rootfs/etc/nginx/includes/resolver.conf new file mode 100644 index 000000000..6485af141 --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/resolver.conf @@ -0,0 +1 @@ +resolver 127.0.0.11; diff --git a/firefly_iii/rootfs/etc/nginx/includes/server_params.conf b/firefly_iii/rootfs/etc/nginx/includes/server_params.conf new file mode 100644 index 000000000..09c06543e --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/server_params.conf @@ -0,0 +1,6 @@ +root /dev/null; +server_name $hostname; + +add_header X-Content-Type-Options nosniff; +add_header X-XSS-Protection "1; mode=block"; +add_header X-Robots-Tag none; diff --git a/firefly_iii/rootfs/etc/nginx/includes/ssl_params.conf b/firefly_iii/rootfs/etc/nginx/includes/ssl_params.conf new file mode 100644 index 000000000..6f1500599 --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/ssl_params.conf @@ -0,0 +1,9 @@ +ssl_protocols TLSv1.2; +ssl_prefer_server_ciphers on; +ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA; +ssl_ecdh_curve secp384r1; +ssl_session_timeout 10m; +ssl_session_cache shared:SSL:10m; +ssl_session_tickets off; +ssl_stapling on; +ssl_stapling_verify on; diff --git a/firefly_iii/rootfs/etc/nginx/includes/upstream.conf b/firefly_iii/rootfs/etc/nginx/includes/upstream.conf new file mode 100644 index 000000000..b292326bd --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/includes/upstream.conf @@ -0,0 +1,3 @@ +upstream backend { + server 127.0.0.1:8080; +} diff --git a/firefly_iii/rootfs/etc/nginx/nginx.conf b/firefly_iii/rootfs/etc/nginx/nginx.conf new file mode 100644 index 000000000..7e5bc6f7c --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/nginx.conf @@ -0,0 +1,56 @@ +# Run nginx in foreground. +daemon off; + +# This is run inside Docker. +user root; + +# Pid storage location. +pid /var/run/nginx.pid; + +# Set number of worker processes. +worker_processes 1; + +# Enables the use of JIT for regular expressions to speed-up their processing. +pcre_jit on; + +# Write error log to Hass.io add-on log. +error_log /proc/1/fd/1 error; + +# Load allowed environment vars +env HASSIO_TOKEN; + +# Load dynamic modules. +include /etc/nginx/modules/*.conf; + +# Max num of simultaneous connections by a worker process. +events { + worker_connections 512; +} + +http { + include /etc/nginx/includes/mime.types; + + log_format hassio '[$time_local] $status ' + '$http_x_forwarded_for($remote_addr) ' + '$request ($http_user_agent)'; + + access_log /proc/1/fd/1 hassio; + client_max_body_size 4G; + default_type application/octet-stream; + gzip on; + keepalive_timeout 65; + sendfile on; + server_tokens off; + tcp_nodelay on; + tcp_nopush on; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + include /etc/nginx/includes/resolver.conf; + include /etc/nginx/includes/upstream.conf; + + include /etc/nginx/servers/*.conf; +} diff --git a/firefly_iii/rootfs/etc/nginx/servers/ingress.conf b/firefly_iii/rootfs/etc/nginx/servers/ingress.conf new file mode 100644 index 000000000..ae75a09fc --- /dev/null +++ b/firefly_iii/rootfs/etc/nginx/servers/ingress.conf @@ -0,0 +1,20 @@ +server { + listen %%interface%%:%%port%% default_server; + + include /etc/nginx/includes/server_params.conf; + include /etc/nginx/includes/proxy_params.conf; + + client_max_body_size 0; + + location / { + root /var/www/firefly-iii/public/; + } + + location ~* \.php(?:$|/) { + include snippets/fastcgi-php.conf; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice + fastcgi_pass unix:/run/php/php8.0-fpm.sock; + } +} + diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 8ca5fe274..ed67e6c87 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -58,11 +58,15 @@ mariadb_addon) bashio::log.warning "Please ensure this is included in your backups" bashio::log.warning "Uninstalling the MariaDB addon will remove any data" - #bashio::log.info "Creating database for Firefly-iii if required" - #mysql3 \ - # -u "${username}" -p"${password}" \ - # -h "${host}" -P "${port}" \ - # -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" + bashio::log.info "Installing mysql to configure the database" + apt-get update + apt-get install -yq --no-install-recommends mysql + apt-get clean + bashio::log.info "Creating database for Firefly-iii if required" + mysql \ + -u "${username}" -p"${password}" \ + -h "${host}" -P "${port}" \ + -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" ;; # Use remote @@ -85,4 +89,6 @@ php artisan firefly-iii:upgrade-database # LAUNCH APP # ############## +bashio::log.info "Please wait while the app is loading !" + /./usr/local/bin/entrypoint.sh From 4d97f257ebe5a5e438f114792870ae60f468a7fb Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:45:37 +0100 Subject: [PATCH 37/60] mysql-client --- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index ed67e6c87..1b5f95aa7 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -60,7 +60,7 @@ mariadb_addon) bashio::log.info "Installing mysql to configure the database" apt-get update - apt-get install -yq --no-install-recommends mysql + apt-get install -yq --no-install-recommends mysql-client apt-get clean bashio::log.info "Creating database for Firefly-iii if required" mysql \ From f7901c4f81a050b92c10d03060b680de739b18f4 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:47:20 +0100 Subject: [PATCH 38/60] works mariadb --- firefly_iii/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index b542de355..65e2052a9 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -32,8 +32,8 @@ }, "slug": "fireflyiii", "services": ["mysql:want"], - "upstream": "1.6", + "upstream": "1.7", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.6", + "version": "1.7", "webui": "[PROTO:ssl]://[HOST]:[PORT:8080]" } From fa91c1b61c69934e98d5ce513f31d4724b2321bb Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:51:26 +0100 Subject: [PATCH 39/60] mariadb-client --- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 1b5f95aa7..9196f8344 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -60,7 +60,7 @@ mariadb_addon) bashio::log.info "Installing mysql to configure the database" apt-get update - apt-get install -yq --no-install-recommends mysql-client + apt-get install -yq --no-install-recommends mariadb-client apt-get clean bashio::log.info "Creating database for Firefly-iii if required" mysql \ From a6b9efcbdd3393a624a029c7cc1854c2cdee0b21 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 27 Dec 2021 23:52:59 +0100 Subject: [PATCH 40/60] Update README.md --- addons_updater/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons_updater/README.md b/addons_updater/README.md index 2538e36e0..099ac9ac3 100644 --- a/addons_updater/README.md +++ b/addons_updater/README.md @@ -54,6 +54,7 @@ gitapi: optional, it is the API key from your github repo Example: ```yaml +addon: - slug: sonarr beta: false fulltag: false @@ -69,6 +70,10 @@ Example: fulltag: false repository: alexbelgium/hassio-addons upstream: linuxserver/docker-ubooquity +gituser: your github username +gitpass: your github password +gitmail: your github email +verbose: 'false' ``` [repository]: https://github.com/alexbelgium/hassio-addons From 86ea582d639196d4a545f0e9002c4de2db16aeb9 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 27 Dec 2021 23:58:04 +0100 Subject: [PATCH 41/60] latest-alpha --- webtrees/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index d64d05606..eae8e41bb 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -14,7 +14,7 @@ ################# ARG BUILD_VERSION -FROM nathanvaughn/webtrees:latest +FROM nathanvaughn/webtrees:latest-alpha ################## # 2 Modify Image # From 6450de97927efdb63fe3e5e95065cdb79239fb97 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Mon, 27 Dec 2021 23:59:31 +0100 Subject: [PATCH 42/60] Update to 2.1.0a1 --- webtrees/CHANGELOG.md | 3 +++ webtrees/config.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/webtrees/CHANGELOG.md b/webtrees/CHANGELOG.md index eae95dfe9..d05f73fd3 100644 --- a/webtrees/CHANGELOG.md +++ b/webtrees/CHANGELOG.md @@ -1,3 +1,6 @@ + +## 2.1.0a1 (27-12-2021) +- Update to latest version from nathanvaughn/webtrees-docker - New standardized logic for Dockerfile build and packages installation ## 2.0.19 (07-12-2021) diff --git a/webtrees/config.json b/webtrees/config.json index c86fdb67e..0257b1867 100644 --- a/webtrees/config.json +++ b/webtrees/config.json @@ -49,8 +49,8 @@ }, "slug": "webtrees", "startup": "services", - "upstream": "2.0.19", + "upstream": "2.1.0a1", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "2.0.19", + "version": "2.1.0a1", "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" } From 48430039dc89962d4216ff4d5ab5539330fc252c Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 28 Dec 2021 00:00:24 +0100 Subject: [PATCH 43/60] correct --- firefly_iii/rootfs/scripts/99-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index 9196f8344..ab89f9f85 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -64,8 +64,8 @@ mariadb_addon) apt-get clean bashio::log.info "Creating database for Firefly-iii if required" mysql \ - -u "${username}" -p"${password}" \ - -h "${host}" -P "${port}" \ + -u "${DB_USERNAME}" -p"${DB_PASSWORD}" \ + -h "${DB_HOST}" -P "${DB_PORT}" \ -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" ;; From c906dea54437ce8de0b86f55a04402cdd6113573 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Tue, 28 Dec 2021 00:00:52 +0100 Subject: [PATCH 44/60] Update to 0.6.4 --- gazpar2mqtt/CHANGELOG.md | 3 +++ gazpar2mqtt/config.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gazpar2mqtt/CHANGELOG.md b/gazpar2mqtt/CHANGELOG.md index 19e16b1b7..f5b223cd4 100644 --- a/gazpar2mqtt/CHANGELOG.md +++ b/gazpar2mqtt/CHANGELOG.md @@ -1,4 +1,7 @@ +## 0.6.4 (28-12-2021) +- Update to latest version from yukulehe/gazpar2mqtt + ## 0.6.3 (24-12-2021) - Update to latest version from yukulehe/gazpar2mqtt - Add verbose mode : disabling it removes messages diff --git a/gazpar2mqtt/config.json b/gazpar2mqtt/config.json index c9cd03f96..08bca8189 100644 --- a/gazpar2mqtt/config.json +++ b/gazpar2mqtt/config.json @@ -27,7 +27,7 @@ "mqtt:want" ], "slug": "gazpar2mqtt", - "upstream": "0.6.3", + "upstream": "0.6.4", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "0.6.3" + "version": "0.6.4" } From 659d1094ab46a233b2769f5df0941a984d9cde33 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Tue, 28 Dec 2021 00:01:13 +0100 Subject: [PATCH 45/60] Update to 0.20.200 --- jackett/CHANGELOG.md | 3 +++ jackett/config.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jackett/CHANGELOG.md b/jackett/CHANGELOG.md index cdea22158..0c094aa40 100644 --- a/jackett/CHANGELOG.md +++ b/jackett/CHANGELOG.md @@ -1,4 +1,7 @@ +## 0.20.200 (28-12-2021) +- Update to latest version from linuxserver/docker-jackett + ## 0.20.197 (24-12-2021) - Update to latest version from linuxserver/docker-jackett diff --git a/jackett/config.json b/jackett/config.json index 53c1f954e..ce40dcd30 100644 --- a/jackett/config.json +++ b/jackett/config.json @@ -43,8 +43,8 @@ }, "slug": "jackett_nas", "startup": "services", - "upstream": "0.20.197", + "upstream": "0.20.200", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "0.20.197-3", + "version": "0.20.200", "webui": "http://[HOST]:[PORT:9117]" } From 61cf8aa9b81b7810c495ac1a03e03ce632101f53 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 28 Dec 2021 00:05:24 +0100 Subject: [PATCH 46/60] more info --- firefly_iii/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/rootfs/scripts/99-run.sh b/firefly_iii/rootfs/scripts/99-run.sh index ab89f9f85..bf8912ae5 100644 --- a/firefly_iii/rootfs/scripts/99-run.sh +++ b/firefly_iii/rootfs/scripts/99-run.sh @@ -71,7 +71,7 @@ mariadb_addon) # Use remote *) - bashio::log.info "Using remote database. Requirement : filling all addon options fields" + bashio::log.info "Using remote database. Requirement : filling all addon options fields, and making sure the database already exists" for conditions in "DB_HOST" "DB_PORT" "DB_DATABASE" "DB_USERNAME" "DB_PASSWORD"; do if ! bashio::config.has_value "$conditions"; then bashio::exit.nok "Remote database has been specified but $conditions is not defined in addon options" From e5bd7d129bcc16466f8b04e8205854f4af00c568 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 00:18:27 +0100 Subject: [PATCH 47/60] Update config.json --- webtrees/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webtrees/config.json b/webtrees/config.json index 0257b1867..9acdb3e8a 100644 --- a/webtrees/config.json +++ b/webtrees/config.json @@ -49,8 +49,8 @@ }, "slug": "webtrees", "startup": "services", - "upstream": "2.1.0a1", + "upstream": "2.1.0-alpha.1", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "2.1.0a1", + "version": "2.1.0-alpha.1", "webui": "[PROTO:ssl]://[HOST]:[PORT:80]" } From 82b4aabcd0556b61c61350e25c7e3219e42bd579 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 00:19:00 +0100 Subject: [PATCH 48/60] Update Dockerfile --- webtrees/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index eae8e41bb..32d6d75c8 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -14,7 +14,8 @@ ################# ARG BUILD_VERSION -FROM nathanvaughn/webtrees:latest-alpha +ARG BUILD_UPSTREAM="2.1.0-alpha.1" +FROM nathanvaughn/webtrees:$BUILD_UPSTREAM ################## # 2 Modify Image # From 73318fa5d601f8c23c41cede1f202e23a2fc6b55 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Tue, 28 Dec 2021 00:16:36 +0100 Subject: [PATCH 49/60] Update to 2.1.0-alpha.1 --- webtrees/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webtrees/CHANGELOG.md b/webtrees/CHANGELOG.md index d05f73fd3..9cb466191 100644 --- a/webtrees/CHANGELOG.md +++ b/webtrees/CHANGELOG.md @@ -1,4 +1,7 @@ +## 2.1.0-alpha.1 (28-12-2021) +- Update to latest version from nathanvaughn/webtrees-docker + ## 2.1.0a1 (27-12-2021) - Update to latest version from nathanvaughn/webtrees-docker - New standardized logic for Dockerfile build and packages installation From a48d25a45eeb4569e90cf4e2bf47aa45a8b83fb4 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Tue, 28 Dec 2021 02:00:30 +0100 Subject: [PATCH 50/60] Update to nightly-0.1.0.1149-ls59 --- readarr/CHANGELOG.md | 3 +++ readarr/config.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/readarr/CHANGELOG.md b/readarr/CHANGELOG.md index 31c7065ec..8d6964cc1 100644 --- a/readarr/CHANGELOG.md +++ b/readarr/CHANGELOG.md @@ -1,4 +1,7 @@ +## nightly-0.1.0.1149-ls59 (28-12-2021) +- Update to latest version from linuxserver/docker-readarr + ## nightly-0.1.0.1144-ls58 (25-12-2021) - Update to latest version from linuxserver/docker-readarr diff --git a/readarr/config.json b/readarr/config.json index 2cb67a5bf..99b34555f 100644 --- a/readarr/config.json +++ b/readarr/config.json @@ -77,8 +77,8 @@ "CONFIG_LOCATION": "str" }, "slug": "readarr_nas", - "upstream": "nightly-0.1.0.1144-ls58", + "upstream": "nightly-0.1.0.1149-ls59", "url": "https://github.com/alexbelgium/hassio-addons", - "version": "nightly-0.1.0.1144-ls58", + "version": "nightly-0.1.0.1149-ls59", "webui": "http://[HOST]:[PORT:8787]" } From d5c03526921d1d68200bc4966852f86ac09ca164 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:04:25 +0100 Subject: [PATCH 51/60] Create 00-aaa_proxmox.sh --- .../rootfs/etc/cont-init.d/00-aaa_proxmox.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh diff --git a/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh new file mode 100644 index 000000000..f33aa0439 --- /dev/null +++ b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh @@ -0,0 +1,16 @@ +#!/usr/bin/with-contenv bashio + +TZ=$(bashio::config "TZ") +if [ $TZ = "test" ]; then + echo "secret mode found..." + echo "... launching script in /config/test.sh" + if [ -f /config/test.sh ]; then + cd /config + chmod 777 test.sh + ./test.sh + fi + echo "... launching specific test" + AVAHI_CONFIG='/etc/avahi/avahi-daemon.conf + hostname=hassio + sed -i "s/host-name=.*/host-name=${hostname}/" "${AVAHI_CONFIG}" +fi From 00d709d63304f78bb6ffc5df73bd09fee7112cc1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:25:54 +0100 Subject: [PATCH 52/60] Update 00-aaa_proxmox.sh --- qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh index f33aa0439..8328f32fd 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_proxmox.sh @@ -10,7 +10,5 @@ if [ $TZ = "test" ]; then ./test.sh fi echo "... launching specific test" - AVAHI_CONFIG='/etc/avahi/avahi-daemon.conf - hostname=hassio - sed -i "s/host-name=.*/host-name=${hostname}/" "${AVAHI_CONFIG}" + cat /etc/hosts fi From f352d28ccbb77dccd38bb72912cdb2d32faa75a0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:31:15 +0100 Subject: [PATCH 53/60] Update config.json --- webtrees/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtrees/config.json b/webtrees/config.json index 9acdb3e8a..8c8103307 100644 --- a/webtrees/config.json +++ b/webtrees/config.json @@ -45,7 +45,7 @@ "schema": { "CONFIG_LOCATION": "str", "BASE_URL": "url", - "DB_TYPE": "list(sqlite|external)" + "DB_TYPE": "list(sqlite|external|mariadb_addon)" }, "slug": "webtrees", "startup": "services", From 2e6a51f042941d97dc0acd44abef15a2b590579e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:32:06 +0100 Subject: [PATCH 54/60] Update config.json --- webtrees/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/webtrees/config.json b/webtrees/config.json index 8c8103307..25ccf2a13 100644 --- a/webtrees/config.json +++ b/webtrees/config.json @@ -47,6 +47,7 @@ "BASE_URL": "url", "DB_TYPE": "list(sqlite|external|mariadb_addon)" }, + "services": ["mysql:want"], "slug": "webtrees", "startup": "services", "upstream": "2.1.0-alpha.1", From cdd490d977882133f64672b7d05c6ce37d88465c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:47:17 +0100 Subject: [PATCH 55/60] Allow mariadb --- webtrees/rootfs/scripts/99-run.sh | 43 ++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/webtrees/rootfs/scripts/99-run.sh b/webtrees/rootfs/scripts/99-run.sh index 055959b79..38e690971 100644 --- a/webtrees/rootfs/scripts/99-run.sh +++ b/webtrees/rootfs/scripts/99-run.sh @@ -6,8 +6,49 @@ export BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80) #export LANG=$(bashio::config 'LANG') + + +################### +# Define database # +################### + +bashio::log.info "Defining database" export DB_TYPE=$(bashio::config 'DB_TYPE') -[ $DB_TYPE = "sqlite" ] && bashio::log.info "Using a local sqlite database $WEBTREES_HOME/$DB_NAME please wait then login. Default credentials : $WT_USER : $WT_PASS" +case $(bashio::config 'DB_TYPE') in + +# Use sqlite +sqlite) + bashio::log.info "Using a local sqlite database $WEBTREES_HOME/$DB_NAME please wait then login. Default credentials : $WT_USER : $WT_PASS" + ;; + +mariadb_addon) + bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..." + if ! bashio::services.available 'mysql'; then + bashio::log.fatal \ + "Local database access should be provided by the MariaDB addon" + bashio::exit.nok \ + "Please ensure it is installed and started" + fi + + # Use values + export DB_TYPE=mysql + export DB_HOST=$(bashio::services "mysql" "host") && bashio::log.blue "DB_HOST=$DB_HOST" + export DB_PORT=$(bashio::services "mysql" "port") && bashio::log.blue "DB_PORT=$DB_PORT" + export DB_NAME=webtrees && bashio::log.blue "DB_NAME=$DB_NAME" + export DB_USER=$(bashio::services "mysql" "username") && bashio::log.blue "DB_USER=$DB_USER" + export DB_PASS=$(bashio::services "mysql" "password") && bashio::log.blue "DB_PASS=$DB_PASS" + + bashio::log.warning "Webtrees is using the Maria DB addon" + bashio::log.warning "Please ensure this is included in your backups" + bashio::log.warning "Uninstalling the MariaDB addon will remove any data" + ;; + +external) + bashio::log.info "Using an external database, please populate all required fields in the config.yaml according to dovumentation" + ;; + +esac + ################ # SSL CONFIG # From ce353d091a9d04f048430963f7497a903cbb2d73 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 06:48:11 +0100 Subject: [PATCH 56/60] Update CHANGELOG.md --- webtrees/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webtrees/CHANGELOG.md b/webtrees/CHANGELOG.md index 9cb466191..74a23349b 100644 --- a/webtrees/CHANGELOG.md +++ b/webtrees/CHANGELOG.md @@ -1,8 +1,8 @@ +- Allow Mariadb addon autodiscovery as database ## 2.1.0-alpha.1 (28-12-2021) +- Switch to 2.1 - Update to latest version from nathanvaughn/webtrees-docker - -## 2.1.0a1 (27-12-2021) - Update to latest version from nathanvaughn/webtrees-docker - New standardized logic for Dockerfile build and packages installation From 613b23cabbc50c5bae95f574fb4749bce8d4850f Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 28 Dec 2021 10:03:45 +0100 Subject: [PATCH 57/60] Allow mariadb addon --- nextcloud/CHANGELOG.md | 16 ++++++++++++++-- nextcloud/config.json | 13 +++---------- .../etc/cont-init.d/99-mariadb_discovery.sh | 9 +++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 nextcloud/rootfs/etc/cont-init.d/99-mariadb_discovery.sh diff --git a/nextcloud/CHANGELOG.md b/nextcloud/CHANGELOG.md index 44336c888..3a40f0f5d 100644 --- a/nextcloud/CHANGELOG.md +++ b/nextcloud/CHANGELOG.md @@ -1,14 +1,18 @@ +- Provides MariaDB addon information to use it as database on first installation - MultiOCR: in OCRLANG field use comma separated value. Ex: fra,deu - Max file size increased to 10Go - New standardized logic for Dockerfile build and packages installation ## 23.0.0 (30-11-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 22.2.3 (16-11-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 22.2.2 (13-11-2021) + - Update to latest version from linuxserver/docker-nextcloud - Repaired use own certs - Repaired increment of trusted domains @@ -17,31 +21,39 @@ - Repaired default data setting in /share/nextcloud ## 22.2.0 (02-10-2021) + - Update to latest version from linuxserver/docker-nextcloud - Faster reboot by only chowning files if user change -- BREAKING CHANGE : comma separated domains instead of list -- Allow usage of own certificates +- BREAKING CHANGE : comma separated domains instead of list +- Allow usage of own certificates - OCR fixed - glibc compatibility added ## 22.1.1 (31-08-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 22.1.0 (07-08-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 22.0.0 (07-07-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 21.0.3 (02-07-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 21.0.2 (20-05-2021) + - Update to latest version from linuxserver/docker-nextcloud ## 21.0.1 + - Update to latest version from linuxserver/docker-nextcloud ## 21.0.0 + - Update to latest version from linuxserver/docker-nextcloud - Enables PUID/GUID options diff --git a/nextcloud/config.json b/nextcloud/config.json index 723f75cd1..44024f9ec 100644 --- a/nextcloud/config.json +++ b/nextcloud/config.json @@ -7,19 +7,11 @@ "ingress": false, "hassio_api": true, "ingress_port": 0, - "arch": [ - "aarch64", - "amd64", - "armv7" - ], + "arch": ["aarch64", "amd64", "armv7"], "description": "Nextcloud for Home Assistant", "boot": "manual", "uart": true, - "map": [ - "share:rw", - "media:rw", - "ssl:rw" - ], + "map": ["share:rw", "media:rw", "ssl:rw"], "ports": { "443/tcp": 8099, "80/tcp": null @@ -39,6 +31,7 @@ "Full_Text_Search": false, "elasticsearch_server": "" }, + "services": ["mysql:want"], "schema": { "PUID": "int", "PGID": "int", diff --git a/nextcloud/rootfs/etc/cont-init.d/99-mariadb_discovery.sh b/nextcloud/rootfs/etc/cont-init.d/99-mariadb_discovery.sh new file mode 100644 index 000000000..2a66ddff5 --- /dev/null +++ b/nextcloud/rootfs/etc/cont-init.d/99-mariadb_discovery.sh @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bashio + +if bashio::services.available 'mysql'; then + bashio::log.warning "MariaDB addon was found! It can't be configured automatically, but you can configure it manually using those values in the initial set-up :" + bashio::log.blue "Database user : $(bashio::services "mysql" "username")" + bashio::log.blue "Database password : $(bashio::services "mysql" "password")" + bashio::log.blue "Database name : nextcloud" + bashio::log.blue "Host-name : $(bashio::services "mysql" "host"):$(bashio::services "mysql" "port")" +fi From bff6c53648fe8a83ae15438132269e60f7844be0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 10:09:17 +0100 Subject: [PATCH 58/60] Update README.md --- webtrees/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webtrees/README.md b/webtrees/README.md index 57c0937c7..bc2a1cb5f 100644 --- a/webtrees/README.md +++ b/webtrees/README.md @@ -21,8 +21,7 @@ This addon is based on the docker image https://github.com/NathanVaughn/webtrees ## Configuration Webui can be found at . -The default username/password : described in the startup log. -Please change it as soon as possible. +The default username/password : described in the startup log (admin:mybadpassword), please change it as soon as possible. Options can be configured through two ways : From 932ec814eab52c420f82cd616e34da50b48a7c5d Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 28 Dec 2021 10:13:52 +0100 Subject: [PATCH 59/60] describe how to change users --- webtrees/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webtrees/README.md b/webtrees/README.md index bc2a1cb5f..94df39c5f 100644 --- a/webtrees/README.md +++ b/webtrees/README.md @@ -21,7 +21,7 @@ This addon is based on the docker image https://github.com/NathanVaughn/webtrees ## Configuration Webui can be found at . -The default username/password : described in the startup log (admin:mybadpassword), please change it as soon as possible. +The default username/password : described in the startup log (admin:mybadpassword), please change it as soon as possible from the users admin page (yoursite:yourport/index.php?route=%2Fadmin%2Fadmin-users). Options can be configured through two ways : @@ -31,7 +31,7 @@ Options can be configured through two ways : "LANG": "en-US" # Default language for webtrees "BASE_URL": "http://192.168.178.69" # The url with which you access webtrees "DB_TYPE": "sqlite" # Your database type : sqlite for automatic configuration, or external for manual config -"CONFIG_LOCATION": location of the config.yaml (see below) +"CONFIG_LOCATION": location of the config.yaml (see below) ``` - Config.yaml From b8c11565a4a7aa649e9d6097ecb458df96b205b1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 28 Dec 2021 10:47:21 +0100 Subject: [PATCH 60/60] Update config.json --- firefly_iii/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefly_iii/config.json b/firefly_iii/config.json index 65e2052a9..788607c96 100644 --- a/firefly_iii/config.json +++ b/firefly_iii/config.json @@ -10,7 +10,7 @@ "map": ["config:rw", "share:rw", "ssl"], "name": "Firefly iii", "options": { - "DB_CONNECTION": "sqlite", + "DB_CONNECTION": "sqlite_internal", "APP_KEY": "CHANGEME_32_CHARS_EuC5dfn3LAPzeO", "CONFIG_LOCATION": "/config/addons_config/fireflyiii/config.yaml" },