Skip to content

Production Ready Docker image with a Python / Flask application

Notifications You must be signed in to change notification settings

emilianobaum/docker-python-flask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-python-flask

My suggestion of a Production Ready Docker image for a Python / Flask application.

The image will be:

  • Small: around 50MB
  • For production: no debugging servers involved
  • Unique: one source code and one image for all environments
  • More secure: developers don't know production's credentials
  • Clean: source code includes only one extra file (Dockerfile)

Why is this image smaller than others?

  • Based on Alipine image
  • Cleanes the system after apk add commands
  • Uses Alpine uwsgi package
  • Doesn't use Supervisord. It uses a bash's job as described here

Environment variables

This demo uses a config setting named "MY_MODULE.name". To override it, you should provide an environment variable called "MODULE_NAME". For example:

docker run -e MODULE_NAME=my_name ...

Special thanks

I was able to create this image because I've learned from:

About

Production Ready Docker image with a Python / Flask application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 32.0%
  • HTML 29.2%
  • Python 22.4%
  • CSS 16.4%