diff --git a/tandoor_recipes/CHANGELOG.md b/tandoor_recipes/CHANGELOG.md index eb6f2e389..39365d7fb 100644 --- a/tandoor_recipes/CHANGELOG.md +++ b/tandoor_recipes/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.4.13 (02-06-2023) +- add configuration option to disable debug mode. +- add local storage folder for external recipe files that should map in to tandoor ## 1.4.12 (27-05-2023) - Update to latest version from TandoorRecipes/recipes diff --git a/tandoor_recipes/README.md b/tandoor_recipes/README.md index 9c0d951da..5e8ec7f8c 100644 --- a/tandoor_recipes/README.md +++ b/tandoor_recipes/README.md @@ -33,6 +33,7 @@ Required : "DB_TYPE": "list(sqlite|postgresql_external)" # Type of database to use. "SECRET_KEY": "str", # Your secret key "PORT": 9928 # By default, the webui is available on http://HAurl:9928. If you ever need to change the port, you should never do it within the app, but only through this option + "Environment": 0|1 # 1 is debug mode, 0 is normal mode. You should run in normal mode unless actively developing. Optional : "POSTGRES_HOST": "str?", # Needed for postgresql_external "POSTGRES_PORT": "str?", # Needed for postgresql_external @@ -62,3 +63,7 @@ If you have in issue with your installation, please be sure to checkout github. ![image](https://github.com/TandoorRecipes/recipes/raw/develop/docs/preview.png) [repository]: https://github.com/alexbelgium/hassio-addons + +## External Recipe files +The directory /config/addons_config/tandoor_recipes/externalfiles can be used for importing external files in to Tandoor. You can map this with /opt/recipes/externalfiles within Docker. +As per directions here: https://docs.tandoor.dev/features/external_recipes/ diff --git a/tandoor_recipes/config.json b/tandoor_recipes/config.json index cbb2b35bc..eaa77834a 100644 --- a/tandoor_recipes/config.json +++ b/tandoor_recipes/config.json @@ -56,7 +56,6 @@ ], "environment": { "DB_ENGINE": "django.db.backends.sqlite3", - "DEBUG": "1", "DISABLE_INGRESS": "true", "POSTGRES_DB": "/config/addons_config/tandoor_recipes/recipes.db", "TRUSTED_PROXIES": "**" @@ -69,7 +68,8 @@ "options": { "ALLOWED_HOSTS": "", "DB_TYPE": "sqlite", - "SECRET_KEY": "YOUR_SECRET_KEY" + "SECRET_KEY": "YOUR_SECRET_KEY", + "DEBUG": "0" }, "panel_icon": "mdi:silverware-fork-knife", "panel_title": "Tandoor Recipes", @@ -87,7 +87,8 @@ "POSTGRES_PASSWORD": "str?", "POSTGRES_PORT": "str?", "POSTGRES_USER": "str?", - "SECRET_KEY": "str" + "SECRET_KEY": "str", + "DEBUG": "list(1|0)" }, "services": [ "mysql:want" diff --git a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh index d69049af4..57e2a36df 100755 --- a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh +++ b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh @@ -8,6 +8,7 @@ export ALLOWED_HOSTS=$(bashio::config 'ALLOWED_HOSTS') && bashio::log.blue "ALLOWED_HOSTS=$ALLOWED_HOSTS" export SECRET_KEY=$(bashio::config 'SECRET_KEY') && bashio::log.blue "SECRET_KEY=$SECRET_KEY" +export DEBUG=$(bashio::config 'DEBUG') && bashio::log.blue "DEBUG=$DEBUG" CSRF_TRUSTED_ORIGINS="http://localhost" for element in ${ALLOWED_HOSTS//,/ }; do # Separate comma separated values @@ -98,10 +99,12 @@ esac ############## echo "Creating symlinks" mkdir -p /config/addons_config/tandoor_recipes/mediafiles +mkdir -p /config/addons_config/tandoor_recipes/externalfiles chmod -R 755 /config/addons_config/tandoor_recipes mkdir -p /data/recipes/staticfiles chmod 755 /data/recipes/staticfiles ln -s /config/addons_config/tandoor_recipes/mediafiles /opt/recipes +ln -s /config/addons_config/tandoor_recipes/externalfiles /opt/recipes ln -s /data/recipes/staticfiles /opt/recipes bashio::log.info "Launching nginx"