Revert "Introduce post deploy migrations into the upgrade process."
This reverts commit 29ec548266.
This commit is contained in:
parent
29ec548266
commit
deccddb760
|
|
@ -111,34 +111,23 @@ class DockerManager::Upgrader
|
|||
|
||||
run("bundle install --deployment --without test --without development")
|
||||
percent(30)
|
||||
run("SKIP_POST_DEPLOYMENT_MIGRATIONS=1 bundle exec rake multisite:migrate")
|
||||
run("bundle exec rake multisite:migrate")
|
||||
percent(40)
|
||||
log("*** Bundling assets. This will take a while *** ")
|
||||
less_memory_flags = "RUBY_GC_MALLOC_LIMIT_MAX=20971520 RUBY_GC_OLDMALLOC_LIMIT_MAX=20971520 RUBY_GC_HEAP_GROWTH_MAX_SLOTS=50000 RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.9 "
|
||||
run("#{less_memory_flags} bundle exec rake assets:precompile")
|
||||
|
||||
percent(80)
|
||||
|
||||
log("Restarting unicorn pid: #{launcher_pid}")
|
||||
Process.kill("USR2", launcher_pid)
|
||||
|
||||
iterations = 0
|
||||
|
||||
while master_pid == unicorn_master_pid do
|
||||
iterations += 1
|
||||
break if iterations >= 60
|
||||
log("Waiting for Unicorn to reload...")
|
||||
sleep 1
|
||||
end
|
||||
|
||||
percent(90)
|
||||
log("Running post deploy migrations")
|
||||
run("bundle exec rake multisite:migrate")
|
||||
|
||||
percent(100)
|
||||
publish('status', 'complete')
|
||||
log_version_upgrade
|
||||
|
||||
log("***********************************************")
|
||||
log("*** After restart, upgrade will be complete ***")
|
||||
log("***********************************************")
|
||||
log("Restarting unicorn pid: #{launcher_pid}")
|
||||
Process.kill("USR2", launcher_pid)
|
||||
log("DONE")
|
||||
|
||||
rescue => ex
|
||||
publish('status', 'failed')
|
||||
STDERR.puts("Docker Manager: FAILED TO UPGRADE")
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
{{#if complete}}
|
||||
<p>Upgrade completed successfully!</p>
|
||||
<p>Note: The web server restarts in the background. It's a good idea to wait 30 seconds or so
|
||||
before refreshing your browser to see the latest version of the application.</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if failed}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue