deploy.md
March 28, 2019 ยท View on GitHub
Bonus Step - Deploy your local app to the Cloud
If you want to keep your application running all the time, you'll want to deploy it to the cloud. The goal is to deploy something like this: http://blockchainbeans2.mybluemix.net/
- In your
blockchainbean2directory, open themanifest.ymlfile. Change the app name to whatever you wish. I called mine testApp123667. When you run thecf pushcommand, this is the file that will be looked at to create the public route where you will go to visit the app. For example, if I called the apptestApp123667then the full domain that will be available after the deployment will betestApp123667.mybluemix.net - Next, use the
cf logincommand to login to IBM Cloud. (I usecf login --ssosince I have a IBMid). - Once you are logged in, pick your org and space where you want to deploy you app. Your org and space will be different than mine.
-
Lastly, use
cf pushto push your newly named app to the IBM Cloud. Thecf pushcommand will look at the directory which has themanifest.ymlfile and then look for apackage.jsonfile to install all required dependencies for your application. If there are problems with your deployment, but the app is working correcly when you run it locally, it will likely be due to either themanifest.ymlorpackage.jsonfile. -
Once that app is deployed, go ahead and open the URL, click on the API Explorer, and submit a /POST/Grower transaction. If everything went well, you should have a app running in the Cloud, with all transactions logged on the IBM Blockchain Platform. Congrats!