A template repository for Dropwizard Groovy applications
Internal and external services are configured by extending the Dropwizard application configuration with additional settings. An environment variable parser is used to allow configuration settings to be overridden at runtime. These configuration options can be seen in the app config file.
This project uses gradle for building and testing. We also use the gradle wrapper to avoid downloading a local distribution. The commands below are helpful for building and testing.
./gradlew build
compile and build the application./gradlew check
run static code analysis and test the application./gradlew shadowJar
builds a fat jar that can be used to run the Dropwizard application
After you have generated the fat jar you can run your application with java using:
java -jar build/libs/dropwizard-groovy-template-1.0.0-SNAPSHOT-all.jar
We strive to have our builds repeatable across development environment so we also provide a Docker build to generate the Dropwizard application. The examples below should be executed from the root of the project.
Running the base docker build run:
docker run --target Build .
Generating the Dropwizard application docker image:
docker run --target Package -t my-app .
This application generates a client for the Dropwizard application by using the swagger specification. The maven asset is available in JCenter, make sure you include the JCenter repository (https://jcenter.bintray.com/) when pulling this client. To use the client provide the following dependency in your project:
Gradle:
implementation 'io.cratekube:dropwizard-groovy-template:1.0.0'
Maven:
<dependency>
<groupId>io.cratekube</groupId>
<artifactId>dropwizard-groovy-template</artifactId>
<version>1.0.0</version>
</dependency>
The API docs for this project are powered by the Swagger Specification. After starting up the application the available
APIs can be found at http://localhost:<configured port>/swagger
If you are interesting in contributing to this project please read the contribution and pull request guidelines. Thank you for your interest in CrateKube!