- Sometimes, to build image (caching effect will not show the recent changes sometimes)
docker-compose up --build
Note : For detail explanation of how to dockerize simple spring boot Java application you can visit my website at guides to code
'Uses Docker Image available at docker hub link below and postgres official docker image to run the application with docker-compose'
and to run, type the command docker run -p 8080:8080 badripaudel77/info-keeper-spring-boot-docker:my-info-app
and hit localhost:8080
in browser and you should good to see the result.
This branch will use docker compose to create image, run as application wants to run with database docker image.
For reference : Docker compose at Baeldung
Spring Web, Hibernate, Data JPA, Thymeleaf, Security, PostgresSQL
- java -> All the source codes
- static -> All CSS, JS & Images and all static files if any
- templates -> All HTML files [thymeleaf]
- application.properties -> all application properties
- pom.xml file -> Includes all the dependencies required
docker-compose up
- To access actuator endpoint, hit /actuator and you'll see all the available endpoints. By default, only /actuator/health is enabled.
- To get all other endpoints, include "management.endpoints.web.exposure.include=*" in application.properties file.
- For example, now you can access: /actuator/metrics, it will give all the metrics information which you can use to see additional information. Like copy name displayed in /metrics and append that as : metrics/hikaricp.connections
- This will give hikari connection pool info like total no of connections. And other ppts will give other important information.