Requirements:
- Docker is installed
To test this service you should follow these steps:
- Building the docker image:
docker build --tag interview-project .
- Run the docker image in a container:
docker run -p8080:8080 --name conversion-service interview-project:latest
- Stop/Remove the running the container :
docker rm --force conversion-service
NOTE: There is better ways to use docker like generate a fatjar and use multistage dockerfile, I have an example in the branch multi-stage-build' but for some reason I can communicate from the exterior to the jar that is running inside the container. So I decided to share what is in master to not use much more time in the exercise as time is a constraint.
Requirements:
- sbt is installed
- Run:
sbt compile test
I chose Akka Http because it was only one endpoint but due to that I ended up writing a Dockerfile that I dot not like (Read more in the Dockerfile)
In a bigger project I would choose finatra which is easier to use, avoids this issue with the Dockerfile at all, is fast and is a complete framework.