mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Reorder upgrade steps
This commit is contained in:
parent
a27ffca499
commit
a4f6a8021e
1 changed files with 15 additions and 12 deletions
|
@ -160,18 +160,6 @@ CREATE EXTENSION IF NOT EXISTS unaccent;CREATE EXTENSION IF NOT EXISTS citext;"
|
||||||
# Open this port
|
# Open this port
|
||||||
yunohost firewall allow Both "$port" 2>&1
|
yunohost firewall allow Both "$port" 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Give permission to the final_path
|
|
||||||
chown -R "$app":"$app" "$final_path"
|
|
||||||
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.hex --force )
|
|
||||||
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.rebar --force )
|
|
||||||
( cd $final_path/$app && sudo -u "$app" mix deps.get )
|
|
||||||
ynh_psql_execute_as_root \
|
|
||||||
"ALTER USER $app WITH SUPERUSER;"
|
|
||||||
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force )
|
|
||||||
ynh_psql_execute_as_root \
|
|
||||||
"ALTER USER $app WITH NOSUPERUSER;"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -211,6 +199,21 @@ ynh_backup_if_checksum_is_different "$final_path/$app/config/prod.secret.exs"
|
||||||
# Recalculate and store the checksum of the file for the next upgrade.
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
ynh_store_file_checksum "$final_path/$app/config/prod.secret.exs"
|
ynh_store_file_checksum "$final_path/$app/config/prod.secret.exs"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MAKE UPGRADE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Give permission to the final_path
|
||||||
|
chown -R "$app":"$app" "$final_path"
|
||||||
|
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.hex --force )
|
||||||
|
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix local.rebar --force )
|
||||||
|
( cd $final_path/$app && sudo -u "$app" mix deps.get )
|
||||||
|
ynh_psql_execute_as_root \
|
||||||
|
"ALTER USER $app WITH SUPERUSER;"
|
||||||
|
( cd $final_path/$app && sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force )
|
||||||
|
ynh_psql_execute_as_root \
|
||||||
|
"ALTER USER $app WITH NOSUPERUSER;"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue