Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vncsmyrnk/work-time-calculator
Simple API that calculates work time for a given parameter inputs
https://github.com/vncsmyrnk/work-time-calculator
Last synced: 11 days ago
JSON representation
Simple API that calculates work time for a given parameter inputs
- Host: GitHub
- URL: https://github.com/vncsmyrnk/work-time-calculator
- Owner: vncsmyrnk
- License: gpl-3.0
- Created: 2024-01-01T13:18:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-04T05:01:28.000Z (10 months ago)
- Last Synced: 2024-02-04T05:30:21.915Z (10 months ago)
- Language: Java
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Work Time Calculator
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.clocked%3Awork-time-calculator&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=com.clocked%3Awork-time-calculator)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.clocked%3Awork-time-calculator&metric=coverage)](https://sonarcloud.io/summary/new_code?id=com.clocked%3Awork-time-calculator)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=com.clocked%3Awork-time-calculator&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=com.clocked%3Awork-time-calculator)
*Attention!* This project was moved to https://github.com/clocked-app/calculations-api.
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.
## Run
```bash
docker build --target base --tag wtc-image .
docker run -it --rm -v "$(pwd)":/var/app -p 8080:8080 wtc-image bash
./gradlew bootRun
```## Development
To use the container as development environment, reuse the container created:
```bash
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](https://neovim.io/) 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.
## Deployment
The release automated workflow publishes the docker images on [Docker Hub](https://hub.docker.com/r/clockedwtc/wtc/tags) and [GitHub Container Registry](https://github.com/vncsmyrnk/work-time-calculator/pkgs/container/wtc).
After pulling the images from the most appropriate location, execute one of the following commands to run the image:
```bash
docker run --rm -p {PORT}:8080 ghcr.io/vncsmyrnk/wtc:{VERSION} # or
docker run --rm -p {PORT}:8080 clockedwtc/wtc:{VERSION}```