mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
Fix upgrade
This commit is contained in:
parent
15a125ccba
commit
654da9fa26
2 changed files with 20 additions and 11 deletions
|
@ -113,13 +113,14 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# PYTHON DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installing more dependencies..."
|
||||
|
||||
virtualenv "$final_path/venv"
|
||||
(
|
||||
set +o nounset
|
||||
source "${final_path}/venv/bin/activate"
|
||||
set -o nounset
|
||||
|
||||
$final_path/venv/bin/pip install --upgrade pip
|
||||
$final_path/venv/bin/pip install gunicorn
|
||||
echo "django-auth-ldap<1.4" >> $final_path/requirements.txt
|
||||
|
@ -129,7 +130,6 @@ virtualenv "$final_path/venv"
|
|||
#=================================================
|
||||
# CONFIGURATION DJANGO
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Configuring application..."
|
||||
|
||||
export prefix="${path_url#"/"}/"
|
||||
|
@ -150,8 +150,8 @@ ln -s $final_path/$app/static $final_path/static
|
|||
chown -R $app:www-data $final_path
|
||||
|
||||
pushd $final_path
|
||||
$final_path/venv/bin/python manage.py migrate --noinput
|
||||
$final_path/venv/bin/python manage.py collectstatic --noinput
|
||||
$final_path/venv/bin/python manage.py migrate --noinput
|
||||
$final_path/venv/bin/python manage.py collectstatic --noinput
|
||||
popd
|
||||
|
||||
# Set permissions to directory
|
||||
|
|
|
@ -125,14 +125,15 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# CONFIGURATION DJANGO
|
||||
# CONFIGURE DJANGO
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring Django..."
|
||||
|
||||
export prefix="${path_url#"/"}/"
|
||||
prefix=${prefix%"/"}
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/app/settings_local.py"
|
||||
ynh_render_template ../conf/local.py.j2 "$final_path/app/setings_local.py"
|
||||
ynh_store_file_checksum --file="$final_path/app/settings_local.py"
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/coin/settings_local.py"
|
||||
ynh_render_template ../conf/local.py.j2 "$final_path/coin/setings_local.py"
|
||||
ynh_store_file_checksum --file="$final_path/coin/settings_local.py"
|
||||
|
||||
virtualenv "$final_path/venv"
|
||||
(
|
||||
|
@ -143,18 +144,26 @@ virtualenv "$final_path/venv"
|
|||
#=================================================
|
||||
# PYTHON DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing more dependencies..."
|
||||
|
||||
echo "django-auth-ldap<1.4" >> $final_path/requirements.txt
|
||||
$final_path/venv/bin/pip install -r $final_path/requirements.txt
|
||||
|
||||
#=================================================
|
||||
# MIGRATE DB
|
||||
#=================================================
|
||||
ynh_script_progression --message="Migrating database..."
|
||||
|
||||
pushd $final_path
|
||||
$final_path/venv/bin/python manage.py migrate --noinput
|
||||
|
||||
#=================================================
|
||||
# COLLECT FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Collecting files..."
|
||||
|
||||
$final_path/venv/bin/python manage.py collectstatic --noinput
|
||||
popd
|
||||
)
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
|
Loading…
Reference in a new issue