An open API service indexing awesome lists of open source software.

https://github.com/markiewb/dockerized-dropwizard-example

My playground for experimenting with Dropwizard and Docker...
https://github.com/markiewb/dockerized-dropwizard-example

Last synced: about 1 year ago
JSON representation

My playground for experimenting with Dropwizard and Docker...

Awesome Lists containing this project

README

          

My playground for experimenting with Dropwizard and Docker...

== Features

* Simple REST-service based on http://www.dropwizard.io/1.2.2/docs/getting-started.html
** Custom HealthCheck (`myTemplateHealthCheck`)
** Custom Metrics (`myRequestCounter`,`myRequestTimer`)
* Exposed JMX-statistics
* Integration of Jolokia for exposing JMX via HTTP
* Dockerization

== Usage

1. Create image with: `docker build . --tag dropwizardexample`
2. Create and run container with JMX: `docker run --rm -p 127.0.0.1:9090:8080 -p 127.0.0.1:10005:10005 -p 127.0.0.1:9091:7777 --name dropwizardcontainer dropwizardexample:latest`
3. Open webapp in browser at http://localhost:9090/hello-world?name=markiewb
4. Access JMX:
* In the container: Access Jolokia via `curl -X GET http://127.0.0.1:7777/jolokia/`
* On the host: Access Jolokia via `curl -X GET http://127.0.0.1:9091/jolokia/`
* Connect with JMX-Client at `localhost:10005`