bzalyaliev / storekeeper

Spring Boot based REST API for automating the accounting of socks in the warehouse of the store.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An application for automating the accounting of socks in the warehouse of the store. The storekeeper must be able to take into account the arrival and release of socks, find out the total number of socks of a certain color and composition at a given time. The external interface of the application is provided as an HTTP API (REST).

How to build

Jar:

./mvnw clean package

Docker image:

docker build . --tag=socks:latest

Docker image using buildpacks (jib):

Attention: Dockerfile won't be used in this case, see Spring documentation and GitHub repository for configuration

./mvnw spring-boot:build-image

Expect in the console:

Successfully built image 'docker.io/library/sock:0.0.1-SNAPSHOT'

How to run

Jar:

java -jar ./target/sock-0.0.1-SNAPSHOT.jar

Docker image:

docker run -p 8090:8080 socks:latest

How to verify:

curl --location --request GET 'http://localhost:8090/api/socks/hello'

Expect: 200 and 'hello'

How to publish

docker tag socks:latest myrepo/socks:latest

docker push myrepo/socks

About

Spring Boot based REST API for automating the accounting of socks in the warehouse of the store.


Languages

Language:Java 98.2%Language:Dockerfile 1.8%