|
1 | | -= WebSocket Java EE 7 - AngularJS - WildFly 8 |
2 | | -Maxime Gréaun <@mgreau> |
| 1 | += WebSocket Java EE 7 - AngularJS - WildFly 10 Docker |
| 2 | +Maxime Gréau <@mgreau> |
3 | 3 | :imagesdir: ./doc/img |
4 | 4 |
|
5 | 5 | This project shows how to use the WebSocket Protocol with : |
6 | 6 |
|
7 | 7 | * Java API for WebSocket (from Java EE 7 specifications) |
8 | 8 | * WebSocket HTML 5 / Javascript API (from W3C) |
9 | 9 | * AngularJS framework |
10 | | -* deployed on WildFly 8.0.0-Beta1 |
11 | | -
|
12 | | -== Overview == |
13 | | -There are 2 samples : |
14 | | - |
15 | | -* the first one (/index.html) which handle *just one* match and uses *only native Javascript (client-side)* |
16 | | -** online demo : http://wildfly-mgreau.rhcloud.com/usopen/ |
17 | | -** local access : http://localhost:8080/usopen/ |
18 | | - |
19 | | -image::html5_websocket_simple.png[Screenshot of the WebSocket Java EE 7 demo with a single match and native JS] |
20 | | - |
21 | | -* the second (/live.html) which is more complicated as it handles *several matches* and it uses *AngularJS client-side solution* |
22 | | -** online demo : http://wildfly-mgreau.rhcloud.com/usopen/live.html |
23 | | -** local access : http://localhost:8080/usopen/live.html |
24 | | - |
| 10 | +* Deployed on *WildFly 10.0.0.Final* on a Docker Container |
| 11 | +* Build with Maven in a *Docker* Container |
| 12 | +
|
| 13 | +== Docker Way |
| 14 | + |
| 15 | +[source,bash] |
| 16 | +---- |
| 17 | +$ docker-machine create --driver virtualbox javaee7-websocket |
| 18 | +$ eval $(docker-machine env javaee7-websocket) |
| 19 | +# Build the project with Maven |
| 20 | +$ docker-compose up |
| 21 | +# Deploy the app on WildFly in a Docker container |
| 22 | +$ docker-compose -f deploy.yml up |
| 23 | +$ open http://$(docker-machine ip javaee7-websocket) |
| 24 | +---- |
| 25 | + |
| 26 | +.Multiple matches in live |
25 | 27 | image::websocket_wildfly_angularjs_tennis.png[Screenshot of the WebSocket Java EE 7 demo with a severals matches and AngularJS deployed on WildFly] |
26 | 28 |
|
27 | 29 |
|
28 | | -== Install on your WildFly 8 Application Server |
29 | | - |
30 | | -. Clone this project : |
| 30 | +== Install on your local WildFly 10 Application Server |
| 31 | + |
| 32 | +. Clone this project : |
31 | 33 |
|
32 | 34 | git clone https://github.com/mgreau/javaee7-websocket |
33 | 35 |
|
34 | | -. Start wildfly : |
| 36 | +. Start wildfly : |
35 | 37 |
|
36 | 38 | $JBOSS_HOME/bin/standalone.sh |
37 | | - |
38 | | -. Build the war and deploy it automatically with maven : |
39 | | - |
40 | | - mvn clean package jboss-as:deploy |
41 | 39 |
|
42 | | -. Launch your browser : |
| 40 | +. Build the war and deploy it automatically with maven : |
43 | 41 |
|
44 | | - ** 1 match : http://localhost:8080/usopen/index.html |
45 | | - ** multiples matches : http://localhost:8080/usopen/live.html |
| 42 | + mvn clean package jboss-as:deploy |
46 | 43 |
|
| 44 | +. Open your browser on http://localhost:8080/usopen/index.html |
0 commit comments