This is an app built with Spring Boot and Gradle to calculate work time for a given parameter inputs.
Docker is used to handle the environments.
docker build --target base --tag wtc-image .
docker run -it --rm -v "$(pwd)":/var/app -p 8080:8080 wtc-image bash
./gradlew bootRun
To use the container as development environment, reuse the container created:
docker build --target base --tag wtc-image .
docker run -it --name wtc-app -v "$(pwd)":/var/app -p 8080:8080 wtc-image bash
# To run it again
docker start wtc-app
# To access it on terminal
docker exec -it wtc bash
To use nvim inside the container for development of features, just run .dev/nvim-setup.sh
. It will install and configure nvim and other dependencies.
This project uses hooks and actions for checking new changes. A minimum code coverage metric is used to verify the changes.
A SonarCloud action is used to check for vulnerabilities and static analysis.
The release automated workflow publishes the docker images on Docker Hub and GitHub Container Registry.
After pulling the images from the most appropriate location, execute one of the following commands to run the image:
docker run --rm -p {PORT}:8080 ghcr.io/clocked-app/calculations-api:{VERSION} # or
docker run --rm -p {PORT}:8080 clockedwtc/calculations-api:{VERSION}