Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to clone a project on heroku

I have 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.

like image 344
rails_guy Avatar asked Mar 21 '10 21:03

rails_guy


2 Answers

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

like image 173
vdaubry Avatar answered Oct 12 '22 01:10

vdaubry


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
like image 22
jqr Avatar answered Oct 12 '22 03:10

jqr