Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.79 KB

cloud-deploy.md

File metadata and controls

54 lines (36 loc) · 1.79 KB

Deploy web app on IBM Cloud using Cloud Foundry

These are instructions for a quick deployment of the web app on IBM Cloud.

Prerequisites

  • An IBM Cloud account. If you do not have one, you can register for free here:
  • Ensure that the IBM Cloud CLI tool is installed locally. Follow the instructions in the linked documentation to configure your environment.

Update manifest.yml

In the manifest.yml file found in the root of the project, change the route value to a unique route of your choosing by replacing the your-host placeholder. For example, route could be - route: my-web-app.mybluemix.net. Just make sure that the subdomain is not already taken. This route corresponds to the URL for which the app will be accessible from. Also, feel free to change the value for name which will correspond to the name of your Cloud Foundry app.

Update app config.js

In src/config.js, update the parameter API_ENDPOINT to use the route you previously specified in the manifest.yml file. Using the above example route, this would be:

API_ENDPOINT: 'https://my-web-app.mybluemix.net/api',

NOTE: https is used because Cloud Foundry apps on the IBM Cloud are hosted using HTTPS.

Make sure build files are up to date

From the root of the project, run:

yarn build

If changes are made to the code, and the app needs to be updated, you will need to build again.

Deploy the app

From the root of the project run:

ibmcloud cf push

This will push a new app or update the app on the IBM Cloud. You can view your apps online from the IBM Cloud resource list.

Visit deployed app

In a browser, navigate to https://<your app route>.