In this first part, you'll learn how to quickly spin up a reproducible development environment with Docker to create a RESTful API powered by Python, Postgres, and the Flask web framework. After the app is up and running locally, you'll learn how to deploy it to an Amazon EC2 instance.
We'll take a practical approach to test driven development (TDD), where we'll write tests first only when it makes sense.
This series uses the following tools and technologies:
Before beginning, you should have some familiarity with the following topics. Refer to the resources for more info:
|Docker||Get started with Docker|
|Docker Compose||Get started with Docker Compose|
|Docker Machine||Docker Machine Overview|
By the end of this part, you should be able to...
Check out the live app, running on EC2 - http://184.108.40.206/
You can also test out the following endpoints...
|Endpoint||HTTP Method||CRUD Method||Result|
|/users||GET||READ||get all users|
|/users/:id||GET||READ||get single user|
|/users||POST||CREATE||add a user|
/usersPOST endpoint is restricted as of Part 3.
Essentially, the app is running in three containers - Flask, Postgres, and Nginx. At the end of this first part, you will have the above app completed and deployed. We'll add authentication and a number of other services in the subsequent parts.
Grab the code from the flask-microservices-users repo.