You can use this project architecture to easily build API on Flask in Docker.
Run this in terminal from project root:
docker build -t <container_tag> .
Run this in terminal:
docker run \
-e JWT_SECRET_KEY=<secret_key> \
-e BUNDLE_API_ERRORS=<boolean> \
-p <host_port>:<containter_port> \
-t \
-i \
<containter_tag>
To see Swagger documentation for your API go to http://<host>[:<port>]/api/<version>/doc
. It will also generate JSON
swagger file and save it in swagger_docs
directory.