1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/13ft_ynh.git synced 2024-09-03 18:06:03 +02:00
This commit is contained in:
Éric Gaspar 2024-02-15 10:39:33 +01:00
parent 99f5a4e661
commit 0973ada50d
3 changed files with 5 additions and 7 deletions

View file

@ -8,8 +8,6 @@ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/ WorkingDirectory=__INSTALL_DIR__/
ExecStart=__INSTALL_DIR__/venv/bin/python3 __INSTALL_DIR__/app/index.py ExecStart=__INSTALL_DIR__/venv/bin/python3 __INSTALL_DIR__/app/index.py
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -55,4 +55,4 @@ ram.runtime = "50M"
main.url = "/" main.url = "/"
[resources.apt] [resources.apt]
packages = "python3-venv" packages = "python3-venv, python3-pip"

View file

@ -35,10 +35,10 @@ yunohost service add $app --description="Bypass paywall" --log="/var/log/$app/$a
#================================================= #=================================================
ynh_script_progression --message="Installing python dependencies..." --weight=1 ynh_script_progression --message="Installing python dependencies..." --weight=1
pushd $install_dir pushd "$install_dir"
ynh_exec_as $app python3 -m venv $install_dir/venv python3 -m venv venv
ynh_exec_as $app "$install_dir/venv/bin/pip" install --upgrade pip venv/bin/pip install --upgrade pip
ynh_exec_as $app "$install_dir/venv/bin/pip" install -r requirements.txt venv/bin/pip install -r requirements.txt
popd popd
ls -l $install_dir ls -l $install_dir