Skip to content

The Fruits REST API demo application that could be used demonstrate Harness CI/CD with RDBMS or NOSQL like MongoDB

License

Notifications You must be signed in to change notification settings

kameshsampath/java-fruits-api

 
 

Repository files navigation

Fruits API

A simple Fruits REST API built using Quarkus.

  • For RDBMS demo use the main branch
  • NoSQL(MongoDB) please switch to mongodb branch.

Pre-requisites

Environment Setup

Copy the .env.example to .env and update the following variables to suit your settings.

  • PLUGIN_REGISTRY - the docker registry to use
  • PLUGIN_TAG - the tag to push the image to docker registry
  • PLUGIN_REPO - the docker registry repository
  • PLUGIN_USERNAME - the docker Registry username
  • PLUGIN_PASSWORD - the docker registry password

Comment/Uncomment and update the database settings in .env based on the Database that you plan to use. Currently only Postgresql/MariaDB are supported.

Build the Application

drone exec --trusted --env-file=.env

The command will test, build and push the container image to the $PLUGIN_REPO:$PLUGIN_TAG.

Run Application

docker-compose up

The application provides a Swagger UI that is accessible at http://localhost:8080/q/swagger-ui which could be used to work with the API.

About

The Fruits REST API demo application that could be used demonstrate Harness CI/CD with RDBMS or NOSQL like MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 48.4%
  • HTML 41.8%
  • Shell 9.8%