Deploy the App

Page last updated:

Page last updated:

In this step you will deploy the app to Swisscom Application Cloud.

Push your app to the cloud by executing the following command and replacing the “my-random-hostname” with your own hostname. This will be part of the URL your app will be reached at and it has to be globally unique so be creative. The -m 128M tells Cloud Foundry to use 128MB of memory for our app which should be plenty.

$ cf push my-ruby-app -m 128M -n my-random-hostname
Creating app my-ruby-app in org MyOrg / space MySpace as user@mydomain.com...
OK

Creating route my-random-hostname.scapp.io...
OK

Binding my-random-hostname.scapp.io to my-ruby-app...
OK

Uploading my-ruby-app...
Uploading app files from: /.../cf-sample-app-ruby
Uploading 6.1K, 17 files
Done uploading
OK

...

requested state: started
instances: 1/1
usage: 128M x 1 instances
urls: my-random-hostname.scapp.io
last uploaded: Wed Mar 30 14:10:57 UTC 2016
stack: unknown
buildpack: ruby 1.6.14

The application is now deployed. Ensure that the app is running:

$ cf app my-ruby-app
Showing health and status for app my-ruby-app in org MyOrg / space MySpace as user@mydomain.com...
OK

requested state: started
instances: 1/1
usage: 128M x 1 instances
urls: my-random-hostname.scapp.io
last uploaded: Wed Mar 30 14:10:57 UTC 2016
stack: cflinuxfs2
buildpack: ruby 1.6.14

     state     since                    cpu    memory          disk        details
#0   running   2016-03-30 04:11:27 PM   0.0%   70.1M of 128M   42M of 1G

Now visit the app at the URL. You can find the URL in the urls property of the statement above.

I have deployed my App
View the source for this page in GitHub