Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i create a clone of an existing app on heroku from another heroku app as separate app?

Tags:

heroku

I have a main app on heroku and another app A on git in location github:a.

I want to create, when it is necessary, copies of A as A1,A2,A3...AN as separate apps on heroku from my main app automatically with different parameters.

How can i do that?

Edit: This process should be done by my main app automatically.

like image 281
Omer Temel Avatar asked Feb 15 '12 10:02

Omer Temel


People also ask

Can you clone a Heroku app?

You cannot clone your app's source from Heroku if you deploy your app with any method besides git push . Other deployment methods do not update your app's Heroku Git repo, causing heroku git:clone to return an empty repository. These other deployment methods include: Deploying directly from GitHub.

How do you fork a Heroku app?

Fork application Adjust your add-on plans as needed by up- or down-grading after forking. Invoke heroku fork to create the target app, copy all Heroku Postgres data and config vars to the new app, and re-provision all add-ons with the same plan. Depending on the size of your database this process may take some time.

Can I git pull from Heroku?

Also note that Heroku should not be considered a git hosting. It means that it's extremely uncommon to perform a git pull from Heroku. Instead, you should use a git hosting (such as GitHub or BitBucket) to store your repository and only perform push to Heroku to deploy the application.


2 Answers

Updating this answer due to Heroku command DEPRECATION:

heroku fork has been deprecated as a core command as of 12/01/2017.

You will need to install the heroku-fork plugin to continue using this command.

heroku plugins:install heroku-fork

Here is a link to the Github plugin repo.

like image 69
Collin Graves Avatar answered Nov 29 '22 07:11

Collin Graves


Use heroku fork to copy an existing application, including add-ons, config vars, and Heroku Postgres data.

See this KB page: Forking Applications.

like image 26
Simone Carletti Avatar answered Nov 29 '22 05:11

Simone Carletti