Name: training-certification-demo-app
Owner: CloudBees
Description: DropWizard + AngularJS demo application, run with Docker, built with Maven as demo purpose
Forked from: dduportal/dw-demo-app
Created: 2017-07-18 16:31:27.0
Updated: 2018-05-18 08:06:44.0
Pushed: 2017-07-18 16:47:09.0
Homepage: null
Size: 75
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Welcome to the DropWizard Demo Application !
The goal of this repository is to show a tiny application example to illustrate build pipelines and tools
To be built, this application needs:
Clone the repository wherever Maven + JDK is available
From the root of the repository:
Whole building process is as simple as
clean install
Just compiling classes:
clean compile
Running unit tests (implies compiling):
test
Running Integration tests (implies compiling but NO unit tests):
verify
Generating the standalone application:
package
“Installing” application in the local Maven repository:
install
The awesome DropWizard framework makes the generated application a standalone one.
You can run it with just a Java JRE 8 installed:
-jar ./target/demoapp.jar server ./hello-world.yml
The application will then be available on http://localhost:8080/ if everything went smoothly
They are a lot of reasons that would make you NOT wanting to launch application in Bare Metal:
8080
port of your machine, you'll be required
to dig into the codebase + documentation to change
listening ports.This is why you can run the application with your own baked Docker image.
A Dockerfile
is provided at the root of the repository
First step is to “build” the Docker image:
er build -t dw-demo-app:latest ./
Then run it in background, letting Docker selecting a port:
$(docker run -d -P dw-demo-app:latest)
Fetch the allocated port by asking docker:
Note that a simple `docker ps
` could be sufficient, but not very machine-readable
er port ${CID} 8080
Example: 0.0.0.0:37567
Browse to the application homepage, using the fetched port: http://{DOCKER SERVICE IP}:37567
{DOCKER SERVICE IP} is the IP address of your Docker service:
localhost
on Docker4Mac or Docker4Windows`boot2docker ip
` using Docker toolboxStop and clean the application:
er stop ${CID} && docker rm -v ${CID}