Skip to content

scottrogowski/docker_flask_nginx_minimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask, Nginx, & Docker minimal example

A minimal example of a docker container running both flask and nginx. Supervisord is required to manage them both since docker only allows for one entrypoint / cmd. The code is well commented.

Why?

For performance reasons, Python should not serve static files. The usual way to manage this is to run multiple containers or setup a good CDN. A good CDN is not always enough and I believe that running an entire application in a single container is simpler and more maintainable that trying to manage multiple containers of different types. I built this in the hope that others might find it useful.

To build:

docker build --tag minimal_server_image .

To run:

docker run --rm --publish 8888:80 --name minimal_server_container -t -i minimal_server_image

To view

Go to http://localhost:8888 in your browser

Globe gif is courtesy NASA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published