git clone https://github.com/Treeptik/spring-petclinic-driver-logs-gelf.git
cd spring-petclinic
mvn spring-boot:run
You can then access petclinic here: http://localhost:8080/
- Run the ELK Stack
pushd elk-stack && docker-compose up -d && popd
- Build the custom image
mvn clean package -DskipTests
docker build --no-cache -t treeptik/petclinic .
- Run the Treeptik/petclinic image to push logs into ELK Stack
docker run -p 8080:8080 --log-driver=gelf --log-opt gelf-address=udp://localhost:12201 treeptik/petclinic
- Logs into Kibana
- Create a new index
- Connect to the application and generate logs during browsing
Spring Boot Configuration | Class or Java property files |
---|---|
The Dockerfile | Dockerfile |
docker-compose up -d
mvn clean package -DskipTests
java -Dspring.profiles.active=mysql,production -jar target/spring-petclinic-1.5.4.jar
Else with maven spring-boot tasks
mvn spring-boot:run -Drun.profiles=mysql,production