Public Repository

Last pushed: 3 months ago
Short Description
Sample Java Spring Boot quote microservice API connecting to MongoDB/CosmosDB
Full Description


This image is one of 5 backend microservice APIs that connect to Azure CosmosDB + a Java front-end website which comprises the Parts Unlimited MRP microservices application. It has hands-on-labs (HOLs) associated with them which can be found at: all of which deploy to Azure Container Service (ACS) with Kubernetes (K8s) orchestrator.

All of these 6 docker images are automatically built using CircleCI:

Click on the badge above to see the docker image build details for all images present here.

The 5 other docker hub images are:


The quote microservice is a Java 8 spring boot API which connects to MongoDB or CosmosDB with MongoDB API. The source code and more details on how to develop, build, and test this code can be found here on GitHub.

The Docker file used to create this image is at the root of that location, but also linked to directly here for convenience. Here is the size and layers breakdown of the :latest tagged image:

Since this is a sample application not under active development, likely the only tag / version will be 1.0.0 which is also latest. However, the image will be updated to ensure the underlying FROM host container is patched where the build of the code resides.

How to use this image

A MongoDB or CosmosDB using MongoDB connection string is required for the API to run and must be passed into the image.

Replace the <mongodb-string> in the command below with your own to run the microservice locally on port 8080. Be sure to insert any database name (lowercase, alphanumeric only) after the base connection url. For instance with CosmosDB string:
mongodb:// would add pumrp and now the connection string becomes: :

docker run -d --name pumrp-quote -p 8080:8080 -e mongo_conn='<mongodb-string>' microsoft/pumrp-quote

Now to verify the API is working, look at the log output via the following command:

docker logs pumrp-quote

After ~30 seconds the logs will display something similar to the following:

2017-07-18 21:57:48.916  INFO [order-service,,,] 5 --- [           main] smpl.order.OrderServiceApplication       : Started OrderServiceApplication in 18.575 seconds (JVM running for 19.257)
2017-07-18 21:57:48.917  INFO [order-service,,,] 5 --- [           main] smpl.order.OrderServiceApplication       : Order Service Ready for use

Issue or Recommendation?

Please report problems, feature requests, or recommendations to the PartsUnlimitedMRPmicro GitHub Issue page. This project is open source and welcomes contributions.

Docker Pull Command

Comments (0)