A repository for practicing with spring boot.
mvn spring-boot:run
To use the application open your web browser to localhost:8080
Getting mood overview:
curl -X GET http://localhost:8080/mood/overview
Setting current mood:
curl -X PUT http://localhost:8080/mood/current --header "Content-Type: application/json" --data "{ \"newMoodId\" : \"HAPPY\" }"
With the backend already running execute:
mvn clean package
./npm start
mvn compile jib:dockerBuild -Dimage=spring-practice
docker run -p 8080:8080 spring-practice
The following will publish to docker hub using the maven project version as the image tag:
mvn clean compile jib:build
The following will run the docker image from the docker hub repository:
docker run -p 8080:8080 tonymowers/spring-practice:<project.version>
for example:
docker run -p 8080:8080 tonymowers/spring-practice:0.4.0-SNAPSHOT
or
docker run -p 8080:8080 tonymowers/spring-practice:latest
The following will publish to docker hub using both the maven project version and 'latest' as the image tags:
mvn clean compile jib:build -Djib.to.tags=latest