mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-05 03:31:30 +00:00
Added configuration base_url to fix outstanding issues with the interface of Grocy
This commit is contained in:
parent
4e6441b4c7
commit
d3cdb01992
4 changed files with 17 additions and 5 deletions
|
@ -19,6 +19,7 @@ comparison to installing any other Home Assistant add-on.
|
||||||
|
|
||||||
1. Search for the "Grocy" add-on in the Supervisor add-on store.
|
1. Search for the "Grocy" add-on in the Supervisor add-on store.
|
||||||
1. Install the "Grocy" add-on.
|
1. Install the "Grocy" add-on.
|
||||||
|
1. Set the `base_url` in the configuration to your home assistant URL.
|
||||||
1. Start the "Grocy" add-on.
|
1. Start the "Grocy" add-on.
|
||||||
1. Check the logs of the "Grocy" add-on to see if everything went well.
|
1. Check the logs of the "Grocy" add-on to see if everything went well.
|
||||||
1. Click on the "OPEN WEB UI" button to get into the interface of Grocy.
|
1. Click on the "OPEN WEB UI" button to get into the interface of Grocy.
|
||||||
|
@ -32,6 +33,7 @@ comparison to installing any other Home Assistant add-on.
|
||||||
Example add-on configuration:
|
Example add-on configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
base_url: http://homeassistant.local:8123
|
||||||
culture: en
|
culture: en
|
||||||
currency: USD
|
currency: USD
|
||||||
entry_page: stock
|
entry_page: stock
|
||||||
|
@ -61,6 +63,11 @@ keyfile: privkey.pem
|
||||||
|
|
||||||
**Note**: _This is just an example, don't copy and paste it! Create your own!_
|
**Note**: _This is just an example, don't copy and paste it! Create your own!_
|
||||||
|
|
||||||
|
### Option `base_url`
|
||||||
|
The `base_url` contains the URL of your home assistant's installation. This is required for your installation to function properly.
|
||||||
|
|
||||||
|
Example: `http://homeassistant.local:8123`
|
||||||
|
|
||||||
### Option: `log_level`
|
### Option: `log_level`
|
||||||
|
|
||||||
The `log_level` option controls the level of log output by the addon and can
|
The `log_level` option controls the level of log output by the addon and can
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"80/tcp": "Web interface (Not required for Ingress)"
|
"80/tcp": "Web interface (Not required for Ingress)"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
|
"base_url": "http://homeassistant.local:8123",
|
||||||
"culture": "en",
|
"culture": "en",
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
"entry_page": "stock",
|
"entry_page": "stock",
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
"keyfile": "privkey.pem"
|
"keyfile": "privkey.pem"
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
|
"base_url": "str",
|
||||||
"log_level": "list(trace|debug|info|notice|warning|error|fatal)?",
|
"log_level": "list(trace|debug|info|notice|warning|error|fatal)?",
|
||||||
"culture": "list(cs|da|de|el_GR|en|en_GB|es|fi|fr|he_IL|hu|it|ja|ko_KR|nl|no|pl|pt_BR|pt_PT|ru|sk_SK|sv_SE|ta|tr|zh_CN|zh_TW)",
|
"culture": "list(cs|da|de|el_GR|en|en_GB|es|fi|fr|he_IL|hu|it|ja|ko_KR|nl|no|pl|pt_BR|pt_PT|ru|sk_SK|sv_SE|ta|tr|zh_CN|zh_TW)",
|
||||||
"currency": "match(^[A-Z]{3}$)",
|
"currency": "match(^[A-Z]{3}$)",
|
||||||
|
|
|
@ -24,7 +24,9 @@ bashio::log.debug 'Symlinking data directory to persistent storage location...'
|
||||||
rm -f -r /var/www/grocy/data
|
rm -f -r /var/www/grocy/data
|
||||||
ln -s /data/grocy /var/www/grocy/data
|
ln -s /data/grocy /var/www/grocy/data
|
||||||
|
|
||||||
# Patch current relative URL handling braindamage
|
if bashio::var.is_empty "$(bashio::config 'base_url')"; then
|
||||||
bashio::log.info "Patching Grocy to fix relative URL handling..."
|
# Patch current relative URL handling braindamage
|
||||||
cd /var/www/grocy || bashio.exit.nok 'Failed cd'
|
bashio::log.info "Patching Grocy to fix relative URL handling..."
|
||||||
patch -p1 < /patches/fix_braindamage.patch || true
|
cd /var/www/grocy || bashio.exit.nok 'Failed cd'
|
||||||
|
patch -p1 < /patches/fix_braindamage.patch || true
|
||||||
|
fi
|
|
@ -5,10 +5,11 @@
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# Generate Ingress configuration
|
# Generate Ingress configuration
|
||||||
|
base_url="$(bashio::config 'base_url')$(bashio::addon.ingress_entry)"
|
||||||
bashio::var.json \
|
bashio::var.json \
|
||||||
name "ingress" \
|
name "ingress" \
|
||||||
port "^9002" \
|
port "^9002" \
|
||||||
base "$(bashio::addon.ingress_entry)" \
|
base "$base_url" \
|
||||||
| tempio \
|
| tempio \
|
||||||
-template /etc/php7/templates/php-fpm.gtpl \
|
-template /etc/php7/templates/php-fpm.gtpl \
|
||||||
-out /etc/php7/php-fpm.d/ingress.conf
|
-out /etc/php7/php-fpm.d/ingress.conf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue