From 67b7da2f61215d1864330bfad369600aa45d4cbe Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 28 Nov 2023 09:20:22 -0600 Subject: [PATCH 1/4] add tandoor container and documentation --- compose/.apps/tandoor/tandoor.aarch64.yml | 3 ++ compose/.apps/tandoor/tandoor.hostname.yml | 3 ++ compose/.apps/tandoor/tandoor.labels.yml | 14 ++++++ compose/.apps/tandoor/tandoor.netmode.yml | 3 ++ compose/.apps/tandoor/tandoor.ports.yml | 4 ++ compose/.apps/tandoor/tandoor.x86_64.yml | 3 ++ compose/.apps/tandoor/tandoor.yml | 22 +++++++++ docs/apps/tandoor.md | 52 ++++++++++++++++++++++ mkdocs.yml | 1 + 9 files changed, 105 insertions(+) create mode 100644 compose/.apps/tandoor/tandoor.aarch64.yml create mode 100644 compose/.apps/tandoor/tandoor.hostname.yml create mode 100644 compose/.apps/tandoor/tandoor.labels.yml create mode 100644 compose/.apps/tandoor/tandoor.netmode.yml create mode 100644 compose/.apps/tandoor/tandoor.ports.yml create mode 100644 compose/.apps/tandoor/tandoor.x86_64.yml create mode 100644 compose/.apps/tandoor/tandoor.yml create mode 100644 docs/apps/tandoor.md diff --git a/compose/.apps/tandoor/tandoor.aarch64.yml b/compose/.apps/tandoor/tandoor.aarch64.yml new file mode 100644 index 0000000000..4bd4e3dcd2 --- /dev/null +++ b/compose/.apps/tandoor/tandoor.aarch64.yml @@ -0,0 +1,3 @@ +services: + tandoor: + image: docker.io/vabene1111/recipes:${POSTGRES_TAG} diff --git a/compose/.apps/tandoor/tandoor.hostname.yml b/compose/.apps/tandoor/tandoor.hostname.yml new file mode 100644 index 0000000000..87e94cb6bd --- /dev/null +++ b/compose/.apps/tandoor/tandoor.hostname.yml @@ -0,0 +1,3 @@ +services: + tandoor: + hostname: ${DOCKERHOSTNAME} diff --git a/compose/.apps/tandoor/tandoor.labels.yml b/compose/.apps/tandoor/tandoor.labels.yml new file mode 100644 index 0000000000..e1bb7b54c3 --- /dev/null +++ b/compose/.apps/tandoor/tandoor.labels.yml @@ -0,0 +1,14 @@ +services: + tandoor: + labels: + com.dockstarter.appinfo.deprecated: "false" + com.dockstarter.appinfo.description: "The recipe manager that allows you to manage your ever growing collection of digital recipes." + com.dockstarter.appinfo.nicename: "Tandoor" + com.dockstarter.appvars.tandoor_enabled: "false" + com.dockstarter.appvars.tandoor_network_mode: "" + com.dockstarter.appvars.tandoor_secret_key: "change_me" + com.dockstarter.appvars.tandoor_allowed_hosts: "*" + com.dockstarter.appvars.tandoor_database_url: "sqlite://localhost/data/db.sqlite3" + com.dockstarter.appvars.tandoor_port_8080: "8080" + com.dockstarter.appvars.tandoor_restart: "unless-stopped" + com.dockstarter.appvars.tandoor_tag: "latest" diff --git a/compose/.apps/tandoor/tandoor.netmode.yml b/compose/.apps/tandoor/tandoor.netmode.yml new file mode 100644 index 0000000000..16efeae28f --- /dev/null +++ b/compose/.apps/tandoor/tandoor.netmode.yml @@ -0,0 +1,3 @@ +services: + tandoor: + network_mode: ${TANDOOR_NETWORK_MODE} diff --git a/compose/.apps/tandoor/tandoor.ports.yml b/compose/.apps/tandoor/tandoor.ports.yml new file mode 100644 index 0000000000..86d1ea247d --- /dev/null +++ b/compose/.apps/tandoor/tandoor.ports.yml @@ -0,0 +1,4 @@ +services: + tandoor: + ports: + - ${TANDOOR_PORT_8080}:8080 diff --git a/compose/.apps/tandoor/tandoor.x86_64.yml b/compose/.apps/tandoor/tandoor.x86_64.yml new file mode 100644 index 0000000000..ad8658e08b --- /dev/null +++ b/compose/.apps/tandoor/tandoor.x86_64.yml @@ -0,0 +1,3 @@ +services: + tandoor: + image: docker.io/vabene1111/recipes:${TANDOOR_TAG} diff --git a/compose/.apps/tandoor/tandoor.yml b/compose/.apps/tandoor/tandoor.yml new file mode 100644 index 0000000000..e1df2d3cd7 --- /dev/null +++ b/compose/.apps/tandoor/tandoor.yml @@ -0,0 +1,22 @@ +services: + tandoor: + container_name: tandoor + environment: + - SECRET_KEY=${TANDOOR_SECRET_KEY} + - ALLOWED_HOSTS=${TANDOOR_ALLOWED_HOSTS} + - DATABASE_URL=${TANDOOR_DATABASE_URL} + - GUNICORN_MEDIA=1 + - TZ=${TZ} + - TIMEZONE=${TZ} + logging: + driver: json-file + options: + max-file: ${DOCKERLOGGING_MAXFILE} + max-size: ${DOCKERLOGGING_MAXSIZE} + restart: ${TANDOOR_RESTART} + volumes: + - /etc/localtime:/etc/localtime:ro + - ${DOCKERCONFDIR}/tandoor/staticfiles:/opt/recipes/staticfiles + - ${DOCKERCONFDIR}/tandoor/mediafiles:/opt/recipes/mediafiles + - ${DOCKERCONFDIR}/tandoor/data:/opt/recipes/data + - ${DOCKERSTORAGEDIR}:/storage diff --git a/docs/apps/tandoor.md b/docs/apps/tandoor.md new file mode 100644 index 0000000000..3ffd741b04 --- /dev/null +++ b/docs/apps/tandoor.md @@ -0,0 +1,52 @@ +# Tandoor + +[![Docker Pulls](https://img.shields.io/docker/pulls/vabene1111/recipes?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/vabene1111/recipes) +[![GitHub Stars](https://img.shields.io/github/stars/vabene1111/recipes?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com//vabene1111/recipes) +[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/tandoor) + +## Description + +[Tandoor](https://docs.tandoor.dev/) is a recipe manager and so much more. +You can import recipes from thousands of websites, generate mealplans, manage your shopping list. +Share and collaborate with your friends and family using a mobile friendly web interface. + +## Install/Setup + +This application has extensive customization options, most docker env variables are documented in the [.env.template](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template) +If you run into any issues, enable debug mode to collect logs before opening a ticket. +``` yaml + tandoor: + environment: + - DEBUG=1 +``` + +### Running with PostgreSQL + +It is highly recommended to use this application with a PostgreSQL database. +To setup with postgres, after installing a postgres server (or enabling the DockSTARTer app) create a database and edit .env to use postgres instead of sqlite. +``` +postgresql://:@/:5432 +``` + +Optionally, make tandoor dependent on the postgres container +``` yaml + tandoor: + depends_on: + - postgres_host +``` + +### Running with SWAG + +It is also highly recommended to serve media files with a web server. If you are already using SWAG you can use nginx to accomplish this. +Edit the docker-compose.override.yml similar to below. + +``` yaml + tandoor: + environment: + - GUNICORN_MEDIA=0 + swag: + volumes: + - ${DOCKERCONFDIR}/recipes/mediafiles:/media +``` + +Copy `swag/nginx/proxy-confs/recipes.subdomain.conf.sample` to recipes.subdomain.conf editing as necessary to match your setup and restart swag. diff --git a/mkdocs.yml b/mkdocs.yml index 244384e7d7..8b33a42307 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -234,6 +234,7 @@ nav: - apps/swag.md - apps/synclounge.md - apps/syncthing.md + - apps/tandoor.md - apps/tautulli.md - apps/tdarr.md - apps/tdarrnode.md From 399c249378268071133f4ce896cd59a9067b0d8f Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 28 Nov 2023 09:24:44 -0600 Subject: [PATCH 2/4] fixed tandoor tag --- compose/.apps/tandoor/tandoor.aarch64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/.apps/tandoor/tandoor.aarch64.yml b/compose/.apps/tandoor/tandoor.aarch64.yml index 4bd4e3dcd2..ad8658e08b 100644 --- a/compose/.apps/tandoor/tandoor.aarch64.yml +++ b/compose/.apps/tandoor/tandoor.aarch64.yml @@ -1,3 +1,3 @@ services: tandoor: - image: docker.io/vabene1111/recipes:${POSTGRES_TAG} + image: docker.io/vabene1111/recipes:${TANDOOR_TAG} From aad17277a0201a4d112c40e11c3001f55582a69b Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 28 Nov 2023 09:38:24 -0600 Subject: [PATCH 3/4] fixed markdown linting --- docs/apps/tandoor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/apps/tandoor.md b/docs/apps/tandoor.md index 3ffd741b04..23949fabaa 100644 --- a/docs/apps/tandoor.md +++ b/docs/apps/tandoor.md @@ -14,6 +14,7 @@ Share and collaborate with your friends and family using a mobile friendly web i This application has extensive customization options, most docker env variables are documented in the [.env.template](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template) If you run into any issues, enable debug mode to collect logs before opening a ticket. + ``` yaml tandoor: environment: @@ -24,11 +25,10 @@ If you run into any issues, enable debug mode to collect logs before opening a t It is highly recommended to use this application with a PostgreSQL database. To setup with postgres, after installing a postgres server (or enabling the DockSTARTer app) create a database and edit .env to use postgres instead of sqlite. -``` -postgresql://:@/:5432 -``` +`TANDOOR_DATABASE_URL='postgresql://:@/:5432` Optionally, make tandoor dependent on the postgres container + ``` yaml tandoor: depends_on: From b1b7d62a3b84d61c147fdb2a7336bafe5d1df1d8 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 28 Nov 2023 11:39:33 -0600 Subject: [PATCH 4/4] added GUNICORN_MEDIA and DEBUG as variables sorted yml labels alphabetically added example command to generate random secret --- compose/.apps/tandoor/tandoor.labels.yml | 2 ++ compose/.apps/tandoor/tandoor.yml | 8 +++++--- docs/apps/tandoor.md | 12 +++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/compose/.apps/tandoor/tandoor.labels.yml b/compose/.apps/tandoor/tandoor.labels.yml index e1bb7b54c3..a5ab6f7c78 100644 --- a/compose/.apps/tandoor/tandoor.labels.yml +++ b/compose/.apps/tandoor/tandoor.labels.yml @@ -4,7 +4,9 @@ services: com.dockstarter.appinfo.deprecated: "false" com.dockstarter.appinfo.description: "The recipe manager that allows you to manage your ever growing collection of digital recipes." com.dockstarter.appinfo.nicename: "Tandoor" + com.dockstarter.appvars.tandoor_debug: "false" com.dockstarter.appvars.tandoor_enabled: "false" + com.dockstarter.appvars.tandoor_gunicorn_media: "1" com.dockstarter.appvars.tandoor_network_mode: "" com.dockstarter.appvars.tandoor_secret_key: "change_me" com.dockstarter.appvars.tandoor_allowed_hosts: "*" diff --git a/compose/.apps/tandoor/tandoor.yml b/compose/.apps/tandoor/tandoor.yml index e1df2d3cd7..f0485cf0a5 100644 --- a/compose/.apps/tandoor/tandoor.yml +++ b/compose/.apps/tandoor/tandoor.yml @@ -2,12 +2,14 @@ services: tandoor: container_name: tandoor environment: - - SECRET_KEY=${TANDOOR_SECRET_KEY} - ALLOWED_HOSTS=${TANDOOR_ALLOWED_HOSTS} - DATABASE_URL=${TANDOOR_DATABASE_URL} - - GUNICORN_MEDIA=1 - - TZ=${TZ} + - DEBUG=${TANDOOR_DEBUG} + - GUNICORN_MEDIA=${TANDOOR_GUNICORN_MEDIA} + - SECRET_KEY=${TANDOOR_SECRET_KEY} - TIMEZONE=${TZ} + - TZ=${TZ} + logging: driver: json-file options: diff --git a/docs/apps/tandoor.md b/docs/apps/tandoor.md index 23949fabaa..0236d356ac 100644 --- a/docs/apps/tandoor.md +++ b/docs/apps/tandoor.md @@ -15,11 +15,8 @@ Share and collaborate with your friends and family using a mobile friendly web i This application has extensive customization options, most docker env variables are documented in the [.env.template](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template) If you run into any issues, enable debug mode to collect logs before opening a ticket. -``` yaml - tandoor: - environment: - - DEBUG=1 -``` +The application requires a secret key for cryptographic signing. It can be any string, but it is recommend to generate a random string. +On linux you can run `tr -dc A-Za-z0-9