Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.48 KB

docker-javaee.adoc

File metadata and controls

44 lines (29 loc) · 1.48 KB

Deploy Java EE Application (Pre-Built WAR)

Ticket Monster is a moderately complex application that demonstrates how to build modern applications using JBoss web technologies.

ticketmonster architecture
Figure 1. Ticket Monster Architecture

Pull the Docker image that contains WildFly and pre-built Java EE application WAR file as shown:

$ docker pull rafabene/wildfly-ticketmonster-h2

The wildfly-ticketmonster-h2 Dockerfile is based on jboss/wildfly and adds the Ticket Monster application as war file.

Run it:

$ docker run -it -p 8080:8080 rafabene/wildfly-ticketmonster-h2

See the application in action at http://<external-ip>:8080/ticket-monster/. The output is shown:

Note
It might take a while for the container to come up. Wait for the server to complete the startup.
javaee ticketmonster
Figure 2. Java EE Application Output

This uses an in-memory database with WildFly application server as shown in the image:

javaee7 hol in memory database
Figure 3. In-memory Database

Only one change were required to the standard jboss/wildfly image:

  1. WAR file is copied to the standalone/deployments directory as:

ADD ticket-monster.war /opt/jboss/wildfly/standalone/deployments/