Sign inSign up

ccavero/simple-calculator

By ccavero

•Updated over 6 years ago

Simple calculator from Spring template CICD

Image
0

985

ccavero/simple-calculator repository overview

⁠Spring Boot template

Build Status codecov.io Quality Gate Docker Build Docker Pulls License

⁠Before starting

We are using this repository as an example of CI/CD. Please read carefully the following slide share presentations:

⁠Description

Spring Boot template for CI with GitHub, Travis CI, SonarCloud and Docker Hub. It exposes an API with this operation:

  • [POST] plus

⁠Technology

  • Java 8+
  • Maven for Java dependency management
  • Spring Boot
  • Lombok for the models

⁠Functionalities

  • Add two numbers without verification

⁠How to deploy

Compile and package the project with

mvn clean package

and execute

java -jar target/spring-boot-template.jar

It can also be run as:

mvn spring-boot:run

Go to your browser and type http://localhost:8082/swagger-ui.html⁠

⁠Environment variables

LOGGING_FOLDER=
LOGGING_MODE=

⁠Docker deployment

Build the image:

docker build -t health/calculator .

Simple deployment:

docker run --name calculator -d health/calculator

Logging can be also configured using LOGGING_FOLDER and sharing a volume (this is useful for example for ELK⁠ processing). The level of the logging can be configured with LOGGING_MODE (dev|prod):

docker run --name calculator -d -v /tmp/log/calculator:/log/calculator -e LOGGING_FOLDER=/log/test -e LOGGING_MODE=dev health/calculator

⁠License

Apache 2.0

By downloading this software, the downloader agrees with the specified terms and conditions of the License Agreement and the particularities of the license provided.

Tag summary

Content type

Image

Digest

Size

105.4 MB

Last updated

over 6 years ago

docker pull ccavero/simple-calculator