forked from swisscom/docs-appcloud-tutorial-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.html.md.erb
63 lines (48 loc) · 1.83 KB
/
deploy.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: Deploy the App
owner: Tobias Fuhrimann
---
<strong><%= modified_date %></strong>
In this step you will deploy the app to <%= vars.product_full %>.
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.
<pre class="terminal">
$ cf push my-nodejs-app -m 128M -n my-random-hostname
Creating app my-nodejs-app in org MyOrg / space MySpace as [email protected]...
OK
Creating route my-random-hostname.scapp.io...
OK
Binding my-random-hostname.scapp.io to my-nodejs-app...
OK
Uploading my-nodejs-app...
Uploading app files from: /.../cf-sample-app-nodejs
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: node.js 1.5.8
</pre>
The application is now deployed. Ensure that the app is running:
<pre class="terminal">
$ cf app my-nodejs-app
Showing health and status for app my-nodejs-app in org MyOrg / space MySpace as [email protected]...
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: node.js 1.5.8
state since cpu memory disk details
#0 running 2016-03-30 04:11:27 PM 0.0% 70.1M of 128M 42M of 1G
</pre>
Now visit the app at the URL. You can find the URL in the `urls` property of the statement above.
<div style="text-align:center;margin:3em;">
<a href="./logs.html" class="btn btn-primary">I have deployed my App</a>
</div>