From c40cd5ff9ec2774d2f2b8ef636d6ffb25d1ab0c6 Mon Sep 17 00:00:00 2001 From: nough Date: Tue, 23 May 2023 18:44:53 +0100 Subject: [PATCH 1/9] added location for externalfiles I'm really not sure if it's the right location, but you should be able to map in /opt/recipes/externalfiles within Tandoor recipes --- tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh | 2 ++ 1 file changed, 2 insertions(+) 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..ad612a342 100755 --- a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh +++ b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh @@ -98,10 +98,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" From 314ecca8955396ece60422c26ed3cb7dada1f382 Mon Sep 17 00:00:00 2001 From: nough Date: Tue, 23 May 2023 18:46:45 +0100 Subject: [PATCH 2/9] Update README.md added info on externalfiles. --- tandoor_recipes/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tandoor_recipes/README.md b/tandoor_recipes/README.md index a33c75395..23212661e 100644 --- a/tandoor_recipes/README.md +++ b/tandoor_recipes/README.md @@ -61,3 +61,6 @@ 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. From 6dd94f7797a5dc42418dbe350e0a58324687b85a Mon Sep 17 00:00:00 2001 From: nough Date: Tue, 23 May 2023 18:53:47 +0100 Subject: [PATCH 3/9] added option to disable debug mode --- tandoor_recipes/config.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tandoor_recipes/config.json b/tandoor_recipes/config.json index a03b07bb6..248daef0a 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": "1" }, "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" From 8c7d328a2a075f8b487e8f2a479bb2ce62ccaf4b Mon Sep 17 00:00:00 2001 From: nough Date: Tue, 23 May 2023 18:57:21 +0100 Subject: [PATCH 4/9] Update README.md add link to external files part of tandoor recipes site. --- tandoor_recipes/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tandoor_recipes/README.md b/tandoor_recipes/README.md index 23212661e..02e5f6f66 100644 --- a/tandoor_recipes/README.md +++ b/tandoor_recipes/README.md @@ -64,3 +64,4 @@ If you have in issue with your installation, please be sure to checkout github. ## 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/ From c9589f4fdafb5a4e8f424db6df86c86d4b7492dc Mon Sep 17 00:00:00 2001 From: nough Date: Tue, 23 May 2023 23:40:10 +0100 Subject: [PATCH 5/9] Update CHANGELOG.md --- tandoor_recipes/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tandoor_recipes/CHANGELOG.md b/tandoor_recipes/CHANGELOG.md index bf5ac004e..7955e6050 100644 --- a/tandoor_recipes/CHANGELOG.md +++ b/tandoor_recipes/CHANGELOG.md @@ -1,4 +1,8 @@ +## 1.4.11 (23-05-2023) +- add configuration option to disable debug mode. +- add local storage folder for external recipe files that should map in to tandoor + ## 1.4.10 (19-05-2023) - Update to latest version from TandoorRecipes/recipes From 95b8d0e95c1de017bd2ac5d86f9ef0c60e587ef4 Mon Sep 17 00:00:00 2001 From: nough Date: Fri, 2 Jun 2023 23:44:59 +0100 Subject: [PATCH 6/9] Update README.md with environment info. --- tandoor_recipes/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tandoor_recipes/README.md b/tandoor_recipes/README.md index bf92691de..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 From 597b644826c51752aa093c1bb69ea7b032305726 Mon Sep 17 00:00:00 2001 From: nough Date: Sat, 3 Jun 2023 11:21:06 +0100 Subject: [PATCH 7/9] Change default debug setting to 0 by default, Tandoor_recipes won't be in debug mode. --- tandoor_recipes/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tandoor_recipes/config.json b/tandoor_recipes/config.json index 7418c1cec..eaa77834a 100644 --- a/tandoor_recipes/config.json +++ b/tandoor_recipes/config.json @@ -69,7 +69,7 @@ "ALLOWED_HOSTS": "", "DB_TYPE": "sqlite", "SECRET_KEY": "YOUR_SECRET_KEY", - "DEBUG": "1" + "DEBUG": "0" }, "panel_icon": "mdi:silverware-fork-knife", "panel_title": "Tandoor Recipes", From aeb79858bb6fb4bddbabaeef03b0f68bb0ca5a0f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:30:52 +0200 Subject: [PATCH 8/9] Lint : remove trailing blank --- tandoor_recipes/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tandoor_recipes/CHANGELOG.md b/tandoor_recipes/CHANGELOG.md index 7e08d1098..39365d7fb 100644 --- a/tandoor_recipes/CHANGELOG.md +++ b/tandoor_recipes/CHANGELOG.md @@ -1,6 +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 +- 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 From 3a8e144adc8a54d1fd4e7f2e53d90deaca368f6a Mon Sep 17 00:00:00 2001 From: nough Date: Thu, 8 Jun 2023 22:45:58 +0100 Subject: [PATCH 9/9] Update 99-run.sh with export var I don't know if this is actually needed, and at this point i'm too afraid to ask. --- tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh | 1 + 1 file changed, 1 insertion(+) 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 ad612a342..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