The project consists of only one microservice.
- food-hygiene-ratings-service that allows you to see how food hygiene ratings are distributed by percentage across a selected Local Authority so that you can understand the profile of establishments in that authority.
- [Docker] (http://docker.com).
To build the project as a docker image, open a command-line window change to the directory where you have downloaded the project source code.
Run the following maven command. This command will execute the Spotify docker plugin defined in the pom.xml file.
./mvnw clean test package docker:build
If everything builds successfully you should see a message indicating that the build was successful.
I have created a docker-compose file that we can use to start the actual image. To start the docker image, change to the docker-compose directory in this project's source code and issue the following docker-compose command:
docker-compose -f docker/common/docker-compose.yml up
If everything starts correctly you should see a bunch of Spring Boot information fly by on standard out. At this point the service will be up and running.
GET localhost:8080/authorities
Was developed to be used by the main endpoint to calculate food hygiene rating percentage by authority.
GET localhost:8080/ratings
GET localhost:8080/authorities/{localAuthorityId}/ratingsPercentage