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-php-app -m 128M -n my-random-hostname
Creating app my-php-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-php-app...
OK

Uploading my-php-app...
Uploading app files from: /.../cf-sample-app-php
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: php 4.3.7

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

$ cf app my-php-app
Showing health and status for app my-php-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: php 4.3.7

     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