Skip to content

Flask restful service in docker for my learn and to take the test

License

Notifications You must be signed in to change notification settings

And0k/flask_rest

Repository files navigation

Flask restful service in docker

GitHub repo: <https://github.com/And0k/flask_rest>

Docker Hub image: <https://hub.docker.com/r/and0k/flask_rest>

Description

Python Flask restful API running with Meinheld controlled by Gunicorn. When receives list of urls of images it converts them to black and white and serve in local folder.

Test restful service without docker

  • run pipenv install -dev
  • run tests using pipenv from /test/
  • to run Flask development server run manage.py from /service_images/ directory.

Docker image was build on Alpine Linux and has size 155MB. Download image: docker pull and0k/flask_rest

Build docker image on Linux

Clone repository and run from its directory:

pipenv install

su

systemctl start docker

docker-compose -f docker-compose.yml up -d

Try out JSON and HTML requests

API supports content negotiation so you can browse results starting from main page http://127.0.0.1:5000/. Send requests directly to this address or REST API using documentation provided by Swagger UI at http://127.0.0.1:5000/doc.

---

This is a test. Original task (russian) see in /system-tech_task[ru].rst

About

Flask restful service in docker for my learn and to take the test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published