Your first deploy
To get used to cloud.gov, practice by deploying a simple “hello world” application using the cloud.gov command line interface (CLI).
- First, go through account setup (if you haven’t already), so that you’re logged into the cloud.gov CLI and have targeted your sandbox.
- Visit this collection of “hello world” applications (tiny sample applications) and use Clone or download to make a copy on your computer. You can download the zip file provided there, or if you use
giton the command line, you can enter
git clone https://github.com/18F/cf-hello-worlds.git
- Move into that directory, for example:
- Look at the collection of tiny apps, and
cdinto the directory for the language/framework you feel most comfortable with. For example:
Deploy the application, where
APPNAMEshould be something unique like
nodejs-aidan). By default on cloud.gov,
APPNAMEis used to construct a route to make your application reachable at https://APPNAME.app.cloud.gov/. Route names must be unique across the platform.
cf push <APPNAME>
Visit it at https://APPNAME.app.cloud.gov/
Try editing the app locally (without committing) and run
cf push <APPNAME>again to see your changes. The changes will be reflected even without being committed to Git. cloud.gov is not Git-aware – it simply deploys whatever is contained in the directory that you
pushfrom. You can set up continuous deployment from a Git repository.
Visit the dashboard (
https://dashboard.fr.cloud.gov/) to see your options for managing your application via your browser.
If you’re done, you can delete your app by running
cf delete <APPNAME>
Good to know
Check out Status, which tells you about cloud.gov service disruptions. You can use Subscribe to Updates in the upper right corner to get email or SMS notifications about platform problems that may affect cloud.gov users.
cloud.gov is based on Cloud Foundry, so in general, the the Cloud Foundry documentation and other Cloud Foundry resources mostly apply to cloud.gov. For example, you can also try deploying the sample apps maintained by the Cloud Foundry community.