Well back on track. One of the things I have used a lot of time on lately is Scala and Docker. I created a small RestAPI in Scala, which can be found here: https://github.com/kiksen1987/JoshAPI
Not much to be said about it. It uses the Spray.io framework. It's just a small API with facts about me. Eg. Name, Address and some Buzzwords, which describes me. Just shared the code public, so others may draw some inspiration from the code and how I structured my API. It wasn't really any big hassle to getting it up and running. It is using the SBT (Scala Build Tools), to get the dependencies and building the project.
For the Docker / Scala project I used Java/Scala framework named Play. I will not be sharing any code for this project, since it more or less just was downloading demo project from Play's homepage. Making some minor tweaks and adding some photos to the project. Afterwards I used SBT to create my Docker image. I pushed my new image to Docker Hub. Afterwards I created a new VM in Windows Azure with Docker installed. Pulled my image and ran it. It can now be found at:
This was really easy to get up and running. Only 1 setting I need to set to make my site public available. It was just adding endpoint to my VM as showed on screenshot below.
This would be just as easy to do on AWS, Digital Ocean or what ever cloud provider you would like to use. The Docker image I created can be found here: https://hub.docker.com/r/kiksen1987/play-scala/ and has been made public available. At the moment this is the only image I have public, but I might write new blog posts in the future and make more public. Same goes for Github projects.
I hope you liked this article.
As always Stay Swag and see you next time.
By the way, I have added links to the two frameworks used below.