codefresh-contrib / cdp-sample-app

Continuous Deployment example application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unlimited testing environments with Codefresh and Kubernetes

This is an example Java application that uses Spring Boot 2, Maven and Docker. It is compiled using Codefresh.

Instructions

To compile (also runs unit tests)

mvn package

Create a multi-stage docker image

To compile and package using Docker multi-stage builds

docker build . -t my-spring-boot-sample

To run the webapp manually

docker run -p 8080:8080 my-spring-boot-sample

....and navigate your browser to http://localhost:8080/

The Dockerfile also has a healthcheck

To run integration tests

docker run -p 8080:8080 my-spring-boot-sample
mvn verify

To use this project in Codefresh

There is also a codefresh.yaml for easy usage with the Codefresh CI/CD platform.

More details can be found in Codefresh documentation

Enjoy!

About

Continuous Deployment example application


Languages

Language:Java 94.4%Language:Dockerfile 5.6%