File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed
Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,4 @@ CMD java -Xmx64m -Xss1024k -jar /opt/app-root/springdemo.jar
3333
3434# the application will listen on this port
3535EXPOSE 8080
36+
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ You can run this on OpenShift (e.g. http://appuio.ch) using the Web-GUI ("Add to
1010oc new-app openshift/jboss-webserver31-tomcat8-openshift:1.1~https://github.com/appuio/springdemo.git
1111oc patch bc/springdemo -p '{"spec":{"resources":{"limits":{"memory":"500Mi"}}}}'
1212oc patch dc/springdemo -p '{"spec":{"template":{"spec":{"containers":[{"name":"springdemo","resources":{"limits":{"memory": "500Mi"}}}]}}}}'
13+ oc cancel-build springdemo
1314oc start-build springdemo
1415oc expose service springdemo
1516```
@@ -34,3 +35,16 @@ $ oc delete all -l app=springdemo
3435
3536For more information about templates: see https://docs.openshift.com/container-platform/latest/dev_guide/templates.html
3637
38+ You can also build/run this example locally using docker:
39+ ```
40+ docker build -t springdemo .
41+ docker run -p 8080:8080 springdemo
42+ ```
43+ The application is then accessible at http://127.0.0.1:8080/
44+
45+ And you can of course also use the Docker builder on OpenShift:
46+ ```
47+ oc new-app --strategy=docker https://github.com/appuio/springdemo.git
48+ oc expose service springdemo
49+ ```
50+
Original file line number Diff line number Diff line change 4444 "metadata" : {
4545 "name" : " ${APPNAME}" ,
4646 "labels" : {
47- "appname " : " ${APPNAME}"
47+ "app " : " ${APPNAME}"
4848 }
4949 },
5050 "spec" : {
116116 "metadata" : {
117117 "name" : " ${APPNAME}" ,
118118 "labels" : {
119- "appname " : " ${APPNAME}"
119+ "app " : " ${APPNAME}"
120120 }
121121 },
122122 "spec" : {
148148 "replicas" : 1 ,
149149 "test" : false ,
150150 "selector" : {
151- "appname " : " ${APPNAME}" ,
151+ "app " : " ${APPNAME}" ,
152152 "deploymentconfig" : " ${APPNAME}"
153153 },
154154 "template" : {
155155 "metadata" : {
156156 "labels" : {
157- "appname " : " ${APPNAME}" ,
157+ "app " : " ${APPNAME}" ,
158158 "deploymentconfig" : " ${APPNAME}"
159159 }
160160 },
198198 "metadata" : {
199199 "name" : " ${APPNAME}" ,
200200 "labels" : {
201- "appname " : " ${APPNAME}"
201+ "app " : " ${APPNAME}"
202202 }
203203 },
204204 "spec" : {
209209 "targetPort" : 8080
210210 }],
211211 "selector" : {
212- "appname " : " ${APPNAME}" ,
212+ "app " : " ${APPNAME}" ,
213213 "deploymentconfig" : " ${APPNAME}"
214214 }
215215 }
219219 "metadata" : {
220220 "name" : " ${APPNAME}" ,
221221 "labels" : {
222- "appname " : " ${APPNAME}"
222+ "app " : " ${APPNAME}"
223223 }
224224 },
225225 "spec" : {
You can’t perform that action at this time.
0 commit comments