how to clone a project on heroku
I h开发者_如何学运维ave a project on heroku working fine. Now I want to create same project with different url (same code) as the one I have working now. So that I can give the new url to the customer as a 'test' site. I know in heroku i can just rename the url but I want to completely separate development from test (database wise).
What is the best solution? Do I start from scratch? cd into new folder on my machine...clone project from github...make new database -test ...push to heroku...etc. etc.
Heroku toolbelt now provides a fork
method to clone an existing application. It will duplicate your app with same source code, same database data and same add-ons.
Just type :
heroku fork --from sourceapp --to targetapp
https://devcenter.heroku.com/articles/fork-app
You should check out heroku_san, I designed it specifically for deploying multiple environments to Heroku easily. It also has grown to include a lot of other niceties you'll need to automate when dealing with multiple "apps" like sharing and auto migrating with restarts.
Once you have it setup it's as simple as:
rake production deploy
I'm using a method very similar to the one presented here: http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html
What is the best solution? Do I start from scratch? cd into new folder on my machine...clone project from github...make new database -test ...push to heroku...etc. etc.
Yeah, I'd just make a copy (clone) of the repo, either from GitHub (if you have it up on GitHub) or the current Heroku location. Then start a new project in Heroku and push the cloned (and possibly modified) second site up to Heroku as that project.
精彩评论