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...
- Host: GitHub
- URL: https://github.com/markiewb/dockerized-dropwizard-example
- Owner: markiewb
- Created: 2017-12-30T11:27:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T12:21:40.000Z (over 8 years ago)
- Last Synced: 2025-02-08T13:42:25.300Z (over 1 year ago)
- Language: Java
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
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`