Openshift transfer app from one domain to another?

2019-08-27 15:47发布

问题:

So I've got an app in one domain lets say it has the following url:

http://app-domain1.rhcloud.com

and I want to move it to my other domain so the url would be

http://app-domain2.rhcloud.com

is there a way of transferring the app domain with out pulling it down deleting the old app and re-uploading it to the new domain ?

Both domains exist before I've started, I own the source domain and I'm shared but not the owner of the target domain.

回答1:

Edit based on your edit: Assuming you only want to migrate the code and not cartridges, the easiest solution would be to simply add the target domain as a new remote to your git config.

Adding a new git remote for your target app/domain:

$ git remote add domain2 ssh://target-giturl
$ git push domain2 master

Also, if you want to rename a domain:

$ rhc domain rename Old_Domain_Name New_Domain_Name