Public Repository

Last pushed: a year ago
Short Description
Test Python flask app restful API application to build multi-container app
Full Description

This app uses MySQL as backend DB. So pls run below command first before starting up python_flask_container.

docker run --name db -e MYSQL_ROOT_PASSWORD=MyNewPass -d mysql

Then run below command to spin up the container of python flask app.

docker run --name lab1 -p 5000:5000 --link db:mysql -d mishraakshay91/python_flask_test

Now install an extension like Postman, etc on your favorite border and hit below POST request.

method - POST


body -
{ "name" : "Foo Bar", "email" : "", "category" : "office supplies|travel|training", "description" : "iPad for office use", "link" : "", "estimated_costs" : "700", "submit_date" : "09-08-2016" }
You should receive a valid response in JSON format with an integer value for the column id.
This means our python app container has established a successful connection with MySQL container, added data in MySQL and returned a valid response of creation of a record.

Docker Pull Command