Skip to content

Latest commit

 

History

History
 
 

dropwizard

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Containerize a Dropwizard application with Jib

How to start the Dropwizard application

  1. Run ./mvnw clean package to build your container
  2. Start the application
    • With Docker: docker run --rm -p 8080:8080 dropwizard-jib-example:1
    • Without Docker: ./mvnw exec:java
  3. Check that your application is running at http://localhost:8080

Health Check

See your application's health at http://localhost:8080/admin/healthcheck

Extras

FreeMaker templating is setup for dropwizard.yml through tkrille/dropwizard-template-config; this allows one to heavily customize the properties file via the container environment with FTL conditional checks and for loops, for example.

How this example was generated

Starter Maven template generated with dropwizard-archetypes

mvn archetype:generate \
  -DarchetypeGroupId=io.dropwizard.archetypes \
  -DarchetypeArtifactId=example \
  -DarchetypeVersion=[REPLACE ME WITH A VALID DROPWIZARD VERSION]

Ref. Dropwizard - Getting Started, Setting up With Maven

The remainder of the archetype code was filled-in following the above guide.

More information

Learn more about Jib.

Learn more about Dropwizard.

Build and run on Google Cloud

Run on Google Cloud