Templates to build microservices

Microservices Templates

Here's the list of the current microservices templates. Each one links to a Github repo, that you can clone and modify to create a new microservice.

Python + Flask

Hello world Microservice written in Python, with the Flask framework.

Ruby + Sinatra

Hello world Microservice written in Ruby, with the Sinatra framework.

Java + Spark

Work in progress...

Node + Express

Work in progress...

To make sure your new microservice follows the standard, here is a suggested workflow :

  • Change the NAME file with the name of your new microservice.
  • Change the README.md file to describe your microservice.
  • Change the LICENSE file for your favorite open-source license.
  • Write some code exposing functionality over a RESTful API. This is the hard part. You can find in the FAQ section a list of best practices and various resources.
  • Update the swagger.json file to describe your API. The Swagger Editor may help.
  • Update the run.sh script to run your microservice.
  • Execute the build.sh script to build a Docker image.
  • Share your work ! Publish the code on Github and the image to the Docker Hub.
  • As you change your microservice over time, update the VERSION file with a new version number, follow the semantic versioning specification.

Container Images

All the microservices are built by reusing a group of Docker images, one for each programming language. They follow a simple msa-image-<language> naming convention.

Images share a few components, Alpine Linux as the container operating system, Nginx as an embedded web server and caching layer, Swagger for the API documentation.

Example of a reusable container image and some of it's layers :

Msa image

An example microservice built with the previous image :

Msa template

Here is the list of the Github repositories of the current images, if you want to take a look :


Docker image for Python


Docker image for Ruby


Work in progress...


Work in progress...