uwsgi-nginx-flask-docker

Docker image with uWSGI and Nginx for Flask applications in Python running in a single container.

APACHE-2.0 License

Stars
3K
Committers
16

Bot releases are hidden (Show)

uwsgi-nginx-flask-docker - 2.1.0 Latest Release

Published by tiangolo 7 months ago

Features

  • ✨ Add support for multiarch builds, including ARM (e.g. Mac M1). PR #347 by @tiangolo.

Refactors

Docs

Upgrades

Internal

uwsgi-nginx-flask-docker - 2.0.0

Published by tiangolo almost 2 years ago

Highlights of this release:

  • Support for Python 3.10, 3.11, and 3.9.
  • Deprecation of Python 3.6 and 2.7.
    • The last Python 3.6 and 2.7 images are available in Docker Hub, but they won't be updated or maintained anymore.
    • The last images with a date tag are python3.6-2022-11-25 and python2.7-2022-11-25.
  • Upgraded versions of all the dependencies.
  • Small improvements and fixes.

Features

Breaking Changes

Upgrades

  • ⬆️ Bump flask from 2.0.1 to 2.2.2 in /docker-images. PR #296 by @dependabot[bot].
  • ⬆️ Upgrade Flask to the latest version to support Python 3.6. PR #301 by @tiangolo.
  • ⬆️ Upgrade Nginx and Alpine (in the base images). PR #283 by @tiangolo.

Docs

Internal

uwsgi-nginx-flask-docker - 1.4.0

Published by tiangolo over 4 years ago

  • Add GitHub Sponsors button. PR #177.
  • Add Python 3.8 and Alpine with Python 3.8. This also includes all the recent updates of the parent image, like:
    • Latest version of Nginx, 1.17.10.
    • Latest version of Debian, Buster.
    • Latest version of Alpine, 3.11.
    • PR #176.
  • Remove support for Python 3.5. PR #175.
  • Refactor build setup:
    • Move to GitHub actions.
    • Re-use and simplify code and configs.
    • Simplify and update tests.
    • Remove deprecated -index sufix tags.
    • PR #173.
uwsgi-nginx-flask-docker - 1.3.0

Published by tiangolo over 4 years ago

  • This is the last version to support:
    • Debian Stretch (before upgrading to Buster).
    • Python 3.5.
    • Alpine 3.7 and 3.8 (before upgrading to Alpine 3.11).
    • Alpine in older versions of Python, 2.7 and 3.6 (Before upgrading to Python 3.8).
    • Tags with -index (use ENV STATIC_INDEX 1 instead).
    • If you need any of those, make sure to use a tag for the build date 2020-05-04.
uwsgi-nginx-flask-docker - 1.2.1

Published by tiangolo over 4 years ago

uwsgi-nginx-flask-docker - 1.2.0

Published by tiangolo about 5 years ago

  • Refactor tests to use env vars and add image tags for each build date, like tiangolo/uwsgi-nginx-flask:python3.7-2019-10-14. PR #154.
  • Upgrade Travis. PR #135.
uwsgi-nginx-flask-docker - 1.1.0

Published by tiangolo over 5 years ago

  • Move /start.sh and /app/prestart.sh functionality to parent image. PR #134.
uwsgi-nginx-flask-docker - 1.0.0

Published by tiangolo over 5 years ago

The first release declared "stable"! 🎉 🍰 🌮

The image has proven to be stable for a long time now, and the API has been frozen (backwards compatible) for a long time too.

And now there are tests covering all the options ensuring stability, which is especially important after changes.

This version reflects the status of the project (actually for long ago) using "semantic versioning".

It also adds changes to:

  • Reduce the chances of introducing bugs.
  • Provide support for several use cases (requested in issues).

Changes

For more details, check the section in the docs: https://github.com/tiangolo/uwsgi-nginx-flask-docker#overriding-nginx-configuration-completely

uwsgi-nginx-flask-docker - Alpine 3.8

Published by tiangolo almost 6 years ago

New Alpine 3.8 images for Python 2.7, Python 3.6 and (temporarily disabled) Python 3.7.

uwsgi-nginx-flask-docker - Python 3.7

Published by tiangolo about 6 years ago

2018-09-22:

  • New Python 3.7 images, based on standard Debian and Alpine Linux. All the documentation and project templates have been updated to use Python 3.7 by default. Thanks to desaintmartin in this PR.
uwsgi-nginx-flask-docker - Nginx worker connections number

Published by tiangolo over 6 years ago

  • You can now use NGINX_WORKER_CONNECTIONS to set the maximum number of Nginx worker connections and NGINX_WORKER_OPEN_FILES to set the maximum number of open files. Thanks to ronlut in this PR.
uwsgi-nginx-flask-docker - Graceful shutdown handling

Published by tiangolo over 6 years ago

2018-06-22:

Improvements from parent image:

  • Make uWSGI require an app to run, instead of going in "full dynamic mode" while there was an error. Supervisord doesn't terminate itself but tries to restart uWSGI and shows the errors. Uses need-app as suggested by luckydonald in this comment.

  • Correctly handled graceful shutdown of uWSGI and Nginx. Thanks to desaintmartin in this PR.

uwsgi-nginx-flask-docker - Alpine, USE_NGINX_WORKER_PROCESSES, and bug fixes

Published by tiangolo over 6 years ago

There are now Alpine flavors for Python3.6 and Python2.7. They have been there for some time, but I hadn't created a release including them.

There's now a USE_NGINX_WORKER_PROCESSES to control how many Nginx processes to run.

And several bug fixes in this image and the parent image.

uwsgi-nginx-flask-docker - Use explicit uwsgi.ini file in example projects

Published by tiangolo almost 7 years ago

Note: The purpose of this release is mainly to upload the updated example zip projects.

uwsgi-nginx-flask-docker - Added support for prestart.sh script, e.g. for migrations

Published by tiangolo almost 7 years ago

2017-12-10: Added support for /app/prestart.sh script to run arbitrary code before starting the app (for example, Alembic - SQLAlchemy migrations). The documentation for the /app/prestart.sh is in the main README.

uwsgi-nginx-flask-docker - Configure which port the container should listen on with LISTEN_PORT

Published by tiangolo almost 7 years ago

2017-12-08: Now you can configure which port the container should listen on, using the environment variable LISTEN_PORT.

Thanks to @tmshn in https://github.com/tiangolo/uwsgi-nginx-flask-docker/pull/27

uwsgi-nginx-flask-docker - Examples for Single-Page Apps (front end) updated to work even with pacakges

Published by tiangolo about 7 years ago

Examples for Single-Page Apps (front end) updated to work even with packages, using app.static_folder instead of hardcoding the path.

uwsgi-nginx-flask-docker - Python package example project and instructions

Published by tiangolo about 7 years ago

2017-09-02:

  • Example project with a Python package structure and a section explaining how to use it and structure a Flask project like that.
  • Also, the examples and documentation now use the flask run commands, that allows running a package application while developing more easily.
uwsgi-nginx-flask-docker - New architecture, env vars for configs, Python 3.6

Published by tiangolo about 7 years ago

Many changes:

  • New official image tags: python3.6, python3.6-index, python.3.5, python3.5-index, python2.7 and python2.7-index. All the other images are deprecated in favor is this ones.
  • Python 3.6 is now the recommended default. Even the example projects for other versions were removed to discourage using older Python versions for new projects.
  • Any of the older images that didn't have a Python version will show a deprecation warning and take some time to start. As soon the tag latest will point to Python 3.6 and the other tags will be removed.
  • There were several improvements in the bas image tiangolo/uwsgi-nginx that improved this image too.
  • By default, now there is no limit in the upload file size in Nginx. It can be configured in an environment variable.
  • It's now possible to configure several things with environment variables:
    • Serve index.html directly: STATIC_INDEX
    • Set the max upload file size: NGINX_MAX_UPLOAD
    • Set a custom uwsgi.ini file (that allows using a custom directory different than /app): UWSGI_INI (using the ideas by @bercikr in #5 ).
    • Set a custom ./static/ path: STATIC_PATH
    • Set a custom /static/ URL: STATIC_URL
  • As all this configurations are available as environment variables, the choices are a lot more simple. Actually, any new project would just need to use a Dockerfile with:
FROM tiangolo/uwsgi-nginx-flask:python3.6

COPY ./app /app

and then customize with environment variables.

uwsgi-nginx-flask-docker - v0.2.0

Published by tiangolo about 8 years ago

Update examples, with new base uwsgi-nginx image that starts a dynamic number of processes from 2 to 16 to handle uWSGI responses.

That's specially useful in cases where there are some slow requests that take time to respond, allowing all the other fast requests to be answered quickly (in a different process) without having to wait for the first slow request to finish.

Also, there's now support for Python 3.5. With an equivalent image tag in Python 3.5 for each standard image tag and an equivalent example project template for each image tag. Nevertheless, Python 2.7 is still the default, as is for the Flask developers.

Package Rankings
Top 9.55% on Proxy.golang.org
Badges
Extracted from project README
Test Deploy
Related Projects