Sign inSign up

jench2103/flask-uwsgi-nginx

By jench2103

•Updated about 5 years ago

This is a Docker base image with uWSGI and Nginx for Flask web applications.

Image
0

1.1K

jench2103/flask-uwsgi-nginx repository overview

⁠Flask Docker Base Image

GitHub issues Docker Image Version (latest semver) Docker Cloud Build Status Docker Pulls GitHub

This is a Docker base image with uWSGI and Nginx for Flask web applications.

⁠Quick reference

⁠Usage

  • Directly pull the image from Docker Hub
    $ docker pull jench2103/flask-uwsgi-nginx:<version>
    
  • Write a Dockerfile to build your image
    FROM jench2103/flask-uwsgi-nginx:<version>
    
    COPY /host/path/to/app.py /workspace
    COPY /host/path/to/requirements.txt /container/path/to/requirements.txt
    
    RUN pip install -r /container/path/to/requirements.txt
    
  • The default python code which uWSGI tries to run is /workspace/app.py with the Flask object named app.
  • The reverse proxy service Nginx is continuous listening to port 80 in the container, which should be mapped to a host port so that you are available to access the Flask application from web browsers.
    • When use docker run command:
      $ docker run -p <host port>:80 -it <image name>
      
    • When use docker-compose.yml:
      services:
          <serivce name>:
              # ... skip ... #
              ports:
                  - <host port>:80
      

⁠Technical reference

⁠License

This project is licensed under the MIT License⁠.

Tag summary

Content type

Image

Digest

Size

349 MB

Last updated

about 5 years ago

docker pull jench2103/flask-uwsgi-nginx