netzwerg / docker-compose-gradle-war-example

Demo Gradle-based Java web app hot-deploy to dockerized Tomcat (incl. remote debugging)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose-gradle-war-example

A Gradle-based example project demonstrating hot-deploy of a Java web application to a dockerized Tomcat.

Build *.war via Gradle (continuous mode):

./gradlew -t build

Deploy to dockerized Tomcat:

docker-compose up

Access demo:

Try this:

  • Change the source πŸ‘©πŸΌβ€πŸ’»

  • Watch how Gradle re-builds the war file 🎁

  • Watch how Tomcat re-deploys the web app πŸ’«

  • Refresh the browser πŸ”„

  • See your changes & celebrate! ✨

Remote Debugging

The provided docker-compose.yml already contains the configuration necessary for remote debugging via JPDA (Java Platform Debugger Architecture).

Use your favorite IDE to connect to the target VM via localhost:8000:

debug config

Try this:

  • Set a breakpoint in your source πŸ›‘

  • Refresh the browser πŸ”„

  • Use the debugger to step through your code 🐞

debug in action

License

Licensed under MIT License.

Β© Rahel LΓΌthy 2019

About

Demo Gradle-based Java web app hot-deploy to dockerized Tomcat (incl. remote debugging)

License:Other


Languages

Language:Java 79.2%Language:Kotlin 20.8%