Skip to content

Commit f6c0850

Browse files
committed
Change README md to adoc
1 parent 1eb4c24 commit f6c0850

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

cloudfoundry-example/README.adoc

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
= Vert.x on Cloud Foundry
2+
3+
This demo shows a very simple hello world Vert.x project for link:https://www.cloudfoundry.org/[Cloud Foundry]. It has a simple HTTP server which simply serves the /webroot/index.html.
4+
5+
This demo uses link:http://vertx.io/[Vert.x] and is packed using the official link:https://github.com/cloudfoundry/java-buildpack[CloudFoundry java-buildpack]. The `manifest.yml` specifies the app's memory to be 768MB because any lower and the java-buildpack throws an error that it can't allocate enough heap space. (See)
6+
7+
The environment variable `PORT` is normally provided by your CloudFoundry service, and therefore can change when being deployed. Otherwise the default port is `8080`.
8+
9+
The `webroot` is located under `src/main/java/resources` so it can be packaged into the JAR file. If the `webroot` is not packaged inside the JAR file like this, then we can't deploy it easily to CloudFoundry using the java-buildpack. A custom buildpack would have to be created instead. But that's beyond the scope of this demo.
10+
11+
This demo also uses Gradle+shadowJar plugin to build the application and all it’s dependencies into a single "fat" jar.
12+
13+
== Prerequisites
14+
15+
* link:https://www.java.com/download/[Java 1.8]
16+
* link:https://docs.cloudfoundry.org/cf-cli/install-go-cli.html[CloudFoundry CLI]
17+
* A Cloud service provider, such as link:https://www.ibm.com/cloud/[IBM Cloud], link:https://pivotal.io/platform[Pivotal], or link:https://cloudplatform.sap.com[SAP].
18+
19+
== Build fat jar
20+
21+
1. Run build `./gradlew clean build`
22+
1. Test app `java -jar build/libs/vertx-cf-0.1.0-all.jar`
23+
1. Visit link:http://localhost:8080/[http://localhost:8080/] to see the app running.
24+
25+
== Deploy to Cloud Foundry
26+
27+
1. Deploy `cf push -f manifest.yml myapp`
28+
1. Run `cf apps` to see the app running. Visit the url provided.

cloudfoundry-example/README.md

-28
This file was deleted.

0 commit comments

Comments
 (0)