mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
fix upgrade by changing the virtualenv type
This commit is contained in:
parent
aa4a7ab2cc
commit
f6250bac70
3 changed files with 24 additions and 9 deletions
|
@ -16,8 +16,8 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=11c81c1f503691272df5002dad8278bd82f34535
|
|
||||||
upgrade=1 from_commit=80a5044d13a6782063fee2d7fb7a01832a6aa767
|
upgrade=1 from_commit=80a5044d13a6782063fee2d7fb7a01832a6aa767
|
||||||
|
upgrade=1 from_commit=806bcb0f320d8e3e28711a9ae1d2b175b95c65ce
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
|
@ -40,9 +40,9 @@
|
||||||
Email=jean-baptiste@holcroft.fr
|
Email=jean-baptiste@holcroft.fr
|
||||||
Notification=all
|
Notification=all
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=11c81c1f503691272df5002dad8278bd82f34535
|
|
||||||
name=Upgrade from 0.15~ynh2
|
|
||||||
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
|
||||||
; commit=80a5044d13a6782063fee2d7fb7a01832a6aa767
|
; commit=80a5044d13a6782063fee2d7fb7a01832a6aa767
|
||||||
name=Upgrade from 0.16.3
|
name=Upgrade from 0.16.3
|
||||||
|
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
||||||
|
; commit=806bcb0f320d8e3e28711a9ae1d2b175b95c65ce
|
||||||
|
name=Upgrade from 0.17.0~ynh2
|
||||||
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
|
@ -70,7 +70,7 @@ ynh_app_setting_set "$app" port "$port"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev virtualenv \
|
||||||
redis-server libldap2-dev libsasl2-dev \
|
redis-server libldap2-dev libsasl2-dev \
|
||||||
`# add arm support` \
|
`# add arm support` \
|
||||||
zlib1g-dev libffi-dev libssl-dev
|
zlib1g-dev libffi-dev libssl-dev
|
||||||
|
@ -138,7 +138,7 @@ ynh_system_user_create "$app" "$final_path"
|
||||||
# PYTHON DEPENDENCIES
|
# PYTHON DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
python3 -m venv "$final_path/code/virtualenv"
|
virtualenv -p python3 "$final_path/code/virtualenv"
|
||||||
(
|
(
|
||||||
set +o nounset
|
set +o nounset
|
||||||
source "${final_path}/code/virtualenv/bin/activate"
|
source "${final_path}/code/virtualenv/bin/activate"
|
||||||
|
|
|
@ -66,6 +66,14 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STOP SERVICES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
systemctl stop "$app-beat.service"
|
||||||
|
systemctl stop "$app-server.service"
|
||||||
|
systemctl stop "$app-worker.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK THE PATH
|
# CHECK THE PATH
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -135,7 +143,7 @@ ynh_system_user_create "$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev virtualenv \
|
||||||
redis-server libldap2-dev libsasl2-dev \
|
redis-server libldap2-dev libsasl2-dev \
|
||||||
`# add arm support` \
|
`# add arm support` \
|
||||||
zlib1g-dev libffi-dev libssl-dev
|
zlib1g-dev libffi-dev libssl-dev
|
||||||
|
@ -146,7 +154,8 @@ ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||||
# PYTHON DEPENDENCIES
|
# PYTHON DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
python3 -m venv "$final_path/code/virtualenv"
|
ynh_secure_remove "$final_path/code/virtualenv"
|
||||||
|
virtualenv -p python3 "$final_path/code/virtualenv"
|
||||||
(
|
(
|
||||||
set +o nounset
|
set +o nounset
|
||||||
source "${final_path}/code/virtualenv/bin/activate"
|
source "${final_path}/code/virtualenv/bin/activate"
|
||||||
|
@ -273,3 +282,9 @@ systemctl reload nginx
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set "$app" code_migration 2
|
ynh_app_setting_set "$app" code_migration 2
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTART Funkwhale
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
systemctl restart "$app.target"
|
Loading…
Reference in a new issue