mirror of
https://github.com/YunoHost-Apps/zeronet_ynh.git
synced 2024-09-03 17:46:12 +02:00
Use venv
This commit is contained in:
parent
cde6976e80
commit
2912924e86
4 changed files with 11 additions and 8 deletions
|
@ -6,7 +6,7 @@ After=network.target
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
ExecStart=/usr/bin/python3 __FINALPATH__/zeronet.py --ui_port __PORT__ --ui_host __DOMAIN__ --fileserver_port __FS_PORT__ --data_dir __DATADIR__/data --log_dir __DATADIR__/log --ui_password __PASSWORD__
|
||||
ExecStart=__FINALPATH__/venv/bin/python3 __FINALPATH__/zeronet.py --ui_port __PORT__ --ui_host __DOMAIN__ --fileserver_port __FS_PORT__ --data_dir __DATADIR__/data --log_dir __DATADIR__/log --ui_password __PASSWORD__
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
|
|
@ -111,8 +111,9 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Building zeronet..."
|
||||
|
||||
pushd "$final_path"
|
||||
pip3 install --upgrade pip
|
||||
pip3 install -r requirements.txt
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements.txt
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
@ -158,7 +159,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
# Allow the app to be public
|
||||
# Everyone can access the app.
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -87,8 +87,9 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Building zeronet..."
|
||||
|
||||
pushd "$final_path"
|
||||
pip3 install --upgrade pip
|
||||
pip3 install -r requirements.txt
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements.txt
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -119,8 +119,9 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Building zeronet..."
|
||||
|
||||
pushd "$final_path"
|
||||
pip3 install --upgrade pip
|
||||
pip3 install -r requirements.txt
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements.txt
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue