Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Users Service

The Users Service covers user account storage, provide user login, register and retrieval for:

  • users

  • cards

  • addresses

REST API

The service exposes a REST API on port 8080. The API Documentation of the REST API is available via http://localhost:8080/swagger-ui.html.

Building the service

In order to build the project and create Docker images for the service, run the following commands:

mvn clean package -Pcontainer

The first command will build project, run unit and integration tests, and install the artifacts that need to be included in the Docker image.

The second command will then package those artifacts, and all of their dependencies into the local Docker image.

You can then manually push generated image to a Docker 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 Docker repository by running the following command instead:

mvn package -Pdocker -DskipTests -Ddocker.repo=<your_docker_repo> -Djib.goal=build

You should replace <your_docker_repo> in the command above with the name of the Docker 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 run the Coherence implementation of the service as Docker container, execute:

docker run -p 8080:8080 ghcr.io/oracle/coherence-spring-sockshop-users

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

curl http://localhost:8080/customers

which should return 200 response code and a list of customers.

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