Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Shipping Service

The Shipping Service contains service implementation, including the domain model, REST API, as well as the data repository abstraction and its Coherence implementation.

API

The service exposes REST API on port 7001.

TBD (add OpenAPI support/link)

Building the service

In order to build all the modules and create container images for the service, simply run the following commands inside the top-level shipping directory:

$ mvn clean install
$ mvn package -Pcontainer -DskipTests

The first command will build all the modules, run unit and integration tests, and install the artifacts that need to be included into the container images into the local Maven repo.

The second command will then package those artifacts, and all of their dependencies, into the local container image with the same names as the corresponding module (one image per module).

You can then manually push generated image to a container repository of your choice in order to make it available to other environments.

Alternatively, you can build and push the image directly to a remote container repository by running the following command instead:

$ mvn package -Pcontainer -DskipTests -Dcontainer.repo=<your_container_repo> -Djib.goal=build

You should replace <your_container_repo> in the command above with the name of the container repository that you can push images to.

Running the service

Coherence is embedded into your application and runs as part of your application container so it allows you to easily scale your service to hundreds of stateful, and optionally persistent nodes.

To run Coherence implementation of the service, simply execute

$ docker run -p 7001:7001 ghcr.io/coherence-helidon-sockshop-sample/shipping

Once the container is up and running, you should be able to access service API by navigating to http://localhost:7001/shipping/.

As a basic test, you should be able to perform an HTTP GET against /health endpoint:

$ curl -i http://localhost:7001/health

which should return HTTP status code 200, and a JSON response with health check details.

To learn how to run the service in Kubernetes, as part of a larger Sock Shop application, please refer to the main documentation page.

License

The Universal Permissive License (UPL), Version 1.0