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.
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.
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.
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.
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.
Use heroku fork
to copy an existing application, including add-ons, config vars, and Heroku Postgres data.
See this KB page: Forking Applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With