I would like to package 13ft, a selfhosted equivalent of 12ft ladder. It allows to bypass some paywalls by fooling the website, impersonating GoogleBot (guess what : a lot of website gives their whole content to GoogleBot for SEO ranking).
how do I start this python script properly ? Including on server restart.
how to stop it properly ? (shut down a SystemD service ?)
how users could do it ?
how to uninstall properly
how can we check that flask isn’t used by another app before removing it ?
how do we transfer an app to Yunohost catalog ? I don’t remember
edit : I found how to do it (in the repository settings), now I waiting for github to unfork the repository as I can’t transfert a example_ynh fork, even with a different name.
you will usually want to use gunicorn which is a small piece of software that creates a bunch of workers for the app such that it’s not a single process handling all the request (imagine only 1 waiter/waitress/cook in a 1000-person restaurant)
(and cf also the ynh_add_systemd_config and similar helper calls in the app install, remove, upgrade, restore))
Not sure why you’d want to stop it ? Maybe you’re referring to having the systemd service listed in the “Services” section of the webadmin. For this you can have a look at the call to yunohost service add in the app install script
Usually Python apps use what’s called virtualenv to properly separate all their dependencies from the rest of the system (similar to nodejs node_modules folder)
This implies the app provides a requirements.txt as part of its source to list its dependencies (and for the love of god, please don’t install stuff with pip globally on a yunohost system, that tends to make everything explode)
Hmmm yeah maybe you’re right, I didnt really have a look into the actual app . Just highlighting that’s the usual stuff, but big +1 for not blindly copypasting stuff, each app has its own quirks
Then yeah I guess you mean the service integration in the Services section of the webadmin
During the uninstall, just stop the service, remove it from yunohost with yunohost service remove(?) and remove the systemd conf with the appropriate helper … the example app should show all this
Hmmm not sure what you mean, requirements.txt should be provided by the upstream app … though you could also build one manually … The syntax is for example this: https://github.com/YunoHost/pepettes/blob/main/requirements.txt (you can see Flask in the list along a bunch of other stuff). requirements.txt are usually generated by running something like pip freeze which list all packages installed + their version
Note that if this is just to install Flask, then there’s no need for a requirements.txt … They become relevant when you start having a bunch of dependencies. To install flask inside the venv, you can just run venv/bin/pip install Flask (not sure about the exact syntax and the call to pip inside the venv depends on the exact context)
I get the application working thanks to the answers on Github, but unfortunately the result isn’t at all convincing: I’ve tried with L’Humanité and Alternatives Économiques, and in both cases I can’t get past the paywall (whereas I can with the Bypass Paywalls Clean extension for Firefox).