TomBursch / kitchenowl

KitchenOwl is a self-hosted grocery list and recipe manager. The backend is made with Flask and the frontend with Flutter. Easily add items to your shopping list before you go shopping. You can also create recipes and add items based on what you want to cook.
https://kitchenowl.org/
GNU Affero General Public License v3.0
1.17k stars 61 forks source link

Feature request: Add Kitchenowl to Yunohost #214

Open anecdotal-testimonio opened 1 year ago

anecdotal-testimonio commented 1 year ago

Hello,

recently I've discovered KitchenOwl and to me it really looks like a straightforward self-hosted grocery list and recipe manager. I'm using Yunohost for self-hosting and would love to see KitchenOwl in their application catalogue.

I've already added it to Yunohost's wishlist

Is there any chance to port KitchenOwl to Yunohost and if so, what help would be needed? Unfortunately, my programming skills are very basic, but would love to help in other ways if needed or possible.

Thank you for your great work! Best regards

TomBursch commented 11 months ago

Thanks for the issue. I haven't heard of Yunohost before, but seems very cool. Although, looking through the documentation, adding it to the catalog seems like a bit of work. I will keep this in mind, but don't expect it to be resolved soon.

Thovi98 commented 11 months ago

Hello! I've discovered your app thanks to the Yunohost wishlist and it looks amazing! I'm willing to try to package it for Yunohost, but the biggest issue so far is that the app seems to only support docker... which Yunohost doesn't.

I've seen the https://github.com/TomBursch/kitchenowl/releases/download/v0.4.8/kitchenowl_Linux.tar.gz tarball but I didn't find out how to install KitchenOwl after extracting it.

@anecdotal-testimonio I don't have so much free time these days so I will do my possible but it can take a while.

TomBursch commented 11 months ago

@Thovi98 Yes the Linux tar is only the app (the same you can install on your phone)

I can roughly give some steps on how a manual install would work. There are two parts to KitchenOwl, the frontend (this repository here), and the backend, which is a python app.

Installing the frontend should be straightforward because it's mainly a nginx server forwarding requests to the backend and serving the web app. The HTML files can be found here: https://github.com/TomBursch/kitchenowl/releases/download/v0.4.8/kitchenowl_Web.tar.gz and the nginx config file can be found here. In the docker image, the variables inside this config file are filled with the environment variables. This should be easy with yunohost as they use nginx themselves and expect you to have a nginx.conf file, thus the frontend install would just be downloading the HTML files and setting up the correct nginx config.

The backend install is not too complicated either. You can follow the installation steps for a development environment https://docs.kitchenowl.org/reference/contributing/ and in the end run the docker entrypoint.sh or only some aspects of it with ./entrypoint.sh uwsgi.ini -gevent 100. In general, installing the backend should more or less be what is happening in the docker build script

There are some aspects one might consider. In docker, the database is upgraded on every start. With yonohost you might be able to just run the flask db uprade command only on upgrades.

The main part of this would be to get everything in the format and files yunohost expects.

Thovi98 commented 11 months ago

Waouh thanks for this detailed answer. I will try it!

Thovi98 commented 11 months ago

Is there also a specific backend release for each new version or do have I to download the zip from the specific release by myself ?

Thovi98 commented 11 months ago

I’ve an issue while trying to installing the backend:

Here's an extract of the logs before the crash. It might help debugging the error:
71876 INFO DEBUG -   Downloading Flask_Bcrypt-1.0.1-py3-none-any.whl (6.0 kB)
71877 INFO DEBUG - Collecting Flask-JWT-Extended==4.5.2
71877 INFO DEBUG -   Downloading Flask_JWT_Extended-4.5.2-py2.py3-none-any.whl (22 kB)
71877 INFO DEBUG - Collecting Flask-Migrate==4.0.4
71877 INFO DEBUG -   Downloading Flask_Migrate-4.0.4-py3-none-any.whl (20 kB)
71878 INFO DEBUG - Collecting Flask-SQLAlchemy==3.0.5
71878 INFO DEBUG -   Downloading flask_sqlalchemy-3.0.5-py3-none-any.whl (24 kB)
71878 INFO DEBUG - Collecting fonttools==4.42.0
71878 INFO DEBUG -   Downloading fonttools-4.42.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB)
71878 INFO DEBUG - Collecting greenlet==2.0.2
71878 INFO DEBUG -   Downloading greenlet-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (610 kB)
71882 INFO DEBUG - Collecting html-text==0.5.2
71882 INFO DEBUG -   Downloading html_text-0.5.2-py2.py3-none-any.whl (7.5 kB)
71883 INFO DEBUG - Collecting html5lib==1.1
71883 INFO DEBUG -   Downloading html5lib-1.1-py2.py3-none-any.whl (112 kB)
71883 INFO DEBUG - Collecting idna==3.4
71883 INFO DEBUG -   Downloading idna-3.4-py3-none-any.whl (61 kB)
71884 INFO DEBUG - ERROR: Could not find a version that satisfies the requirement ingredient-parser-nlp==0.1.0b3
71884 INFO DEBUG - ERROR: No matching distribution found for ingredient-parser-nlp==0.1.0b3

Do you have an idea what could be the issue about ingredient-parser-nlp==0.1.0b3?

TomBursch commented 11 months ago

Thanks for all the work you did! Sorry, I was a bit busy this weekend, and couldn't reply earlier.

Strange error you have there. PyPi https://pypi.org/project/ingredient-parser-nlp/ lists 0.1.0b3 as a release. I've updated all requirements to the latest version on the main branch, maybe that will help.

The backend releases are tagged, and since you likely need the source code anyway, this should be enough https://github.com/TomBursch/kitchenowl-backend/tags if not, please let me know what you need.

Thovi98 commented 11 months ago

Thanks for all the work you did! Sorry, I was a bit busy this weekend, and couldn't reply earlier.

No worries, there is no hurry :D

Strange error you have there. PyPi https://pypi.org/project/ingredient-parser-nlp/ lists 0.1.0b3 as a release. I've updated all requirements to the latest version on the main branch, maybe that will help.

Unfortunately not, but I’ve found the issue. In Yunohost, we are still on Bullseye with Python 3.9, so we only can install ingredient-parser-nlp==0.1.0b2.

ERROR: Ignored the following versions that require a different python version: 0.1.0b3 Requires-Python >=3.10; 0.1.0b4 Requires-Python >=3.10
58431 INFO DEBUG - ERROR: Could not find a version that satisfies the requirement ingredient-parser-nlp==0.1.0b4 (from versions: 0.1.0a1, 0.1.0a2, 0.1.0a3, 0.1.0a4, 0.1.0a5, 0.1.0b1, 0.1.0b2)
58431 INFO DEBUG - ERROR: No matching distribution found for ingredient-parser-nlp==0.1.0b4

Is it a deal breaker or may I try to install KitchenOwl with ingredient-parser-nlp==0.1.0b2?

TomBursch commented 11 months ago

Oh, that's a bummer, using an older version of the ingredient parser shouldn't be a problem, but KitchenOwl itself requires Python 3.11 as I'm using the Self type hint everywhere. I'll look into ways to make the code backwards compatible.

Thovi98 commented 11 months ago

When you have managed to make the code backward compatible (if you do it, no pressure 😇), ping me here so I know I can continue the work for the Yunohost package.