aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2018-09-05 22:20:27 +0200
committernemsia <nemsia@nemsia.org>2018-09-05 22:20:27 +0200
commit858c7cf69419fccbbcb64f4a6a28a280c1383bb5 (patch)
tree45d5262cd5d82a13b0066d5dec5f0c12d094abb5 /scripts
parent2d1465e29b651445603eae24d9d939fe9dfc5f5c (diff)
downloadmastodon_ynh-858c7cf69419fccbbcb64f4a6a28a280c1383bb5.tar.gz
mastodon_ynh-858c7cf69419fccbbcb64f4a6a28a280c1383bb5.tar.bz2
mastodon_ynh-858c7cf69419fccbbcb64f4a6a28a280c1383bb5.zip
Change upgrade db:migrate for 2.5.0
Diffstat (limited to 'scripts')
-rw-r--r--scripts/upgrade20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index b80ecdb..9bd8864 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -104,10 +104,9 @@ ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libi
chown -R $app: $final_path/live
# Stop Mastodon Services
-# Restart Mastodon
-yunohost service stop "$app-web"
-yunohost service stop "$app-sidekiq"
-yunohost service stop "$app-streaming"
+#yunohost service stop "$app-web"
+#yunohost service stop "$app-sidekiq"
+#yunohost service stop "$app-streaming"
# Download Mastodon
ynh_setup_source "$final_path/live" "app-mastodon"
@@ -170,19 +169,30 @@ popd
sudo su - $app <<COMMANDS
pushd ~/live
-RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails db:migrate
+SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails db:migrate
COMMANDS
)
#=================================================
# RESTART MASTODON
#=================================================
+yunohost service stop "$app-web"
+yunohost service stop "$app-sidekiq"
+yunohost service stop "$app-streaming"
yunohost service start "$app-web"
yunohost service start "$app-sidekiq"
yunohost service start "$app-streaming"
# Waiting start all services
sleep 30
+#=================================================
+# DB:Migrate after restart 2.5.0
+#=================================================
+
+sudo su - $app <<COMMANDS
+pushd ~/live
+RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails db:migrate
+COMMANDS
#=================================================
# RELOAD NGINX