删除并重新部署Rails应用程序到heroku [英] Delete and Redeploy Rails app to heroku

查看:96
本文介绍了删除并重新部署Rails应用程序到heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个部署到Heroku的Rails应用程序。我最近做了大量的修改,删除了旧的迁移,重新创建了新的迁移,重新设计并处理了合并冲突....这个列表继续。



现在,我想要从heroku擦除我的整个heroku制作应用程序,并将我的代码从我的github master 分支重新部署到Heroku。



有没有简单或正确的方式来删除我的Heroku应用程序,擦干净,然后重新部署? 如果你不想删除整个应用程序(也许你想保留你的附加组件和其他配置同样),您可以重置数据库并强制更新代码。



部署新代码,使用 -f 标志强制更新:

  git push heroku master -f 

删除并重新创建数据库:

  heroku pg:reset< DATABASE> 

迁移新数据库:

  heroku run rake db:migrate 


I have a rails app that is deployed to Heroku. I recently made a ton of changes, deleted old migrations, recreated new migrations, rebased and dealt with merge conflicts....the list goes on.

Now, I want to wipe my entire heroku "production" app from heroku and redeploy my code from my github master branch to Heroku.

Is there an easy or "right" way to delete my app on Heroku, wipe it clean, and then redeploy?

解决方案

If you don't want to delete the entire application (perhaps you want to keep your add-ons and other configuration the same), you can reset the database and force update the code.

Deploy your new code, forcing the update by using the -f flag:

git push heroku master -f

Drop and recreate the database:

heroku pg:reset <DATABASE>

Migrate the fresh database:

heroku run rake db:migrate

这篇关于删除并重新部署Rails应用程序到heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆