Docker image with uWSGI and Nginx for Flask applications in Python running in a single container.
APACHE-2.0 License
Published by tiangolo almost 2 years ago
Highlights of this release:
python3.6-2022-11-25
and python2.7-2022-11-25
.Published by tiangolo over 4 years ago
1.17.10
.3.11
.-index
sufix tags.Published by tiangolo over 4 years ago
-index
(use ENV STATIC_INDEX 1
instead).2020-05-04
.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:
uwsgi-nginx
and PR #121./app/nginx.conf
file that overrides the generated one. PR #51 in the parent image uwsgi-nginx
and PR #122.For more details, check the section in the docs: https://github.com/tiangolo/uwsgi-nginx-flask-docker#overriding-nginx-configuration-completely
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.
Published by tiangolo about 6 years ago
2018-09-22:
Published by tiangolo over 6 years ago
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.
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.
Published by tiangolo almost 7 years ago
Note: The purpose of this release is mainly to upload the updated example zip projects.
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.
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
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.
Published by tiangolo about 7 years ago
2017-09-02:
flask run
commands, that allows running a package application while developing more easily.Published by tiangolo about 7 years ago
Many changes:
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.latest
will point to Python 3.6 and the other tags will be removed.tiangolo/uwsgi-nginx
that improved this image too.index.html
directly: STATIC_INDEX
NGINX_MAX_UPLOAD
uwsgi.ini
file (that allows using a custom directory different than /app
): UWSGI_INI
(using the ideas by @bercikr in #5 )../static/
path: STATIC_PATH
/static/
URL: STATIC_URL
Dockerfile
with:FROM tiangolo/uwsgi-nginx-flask:python3.6
COPY ./app /app
and then customize with environment variables.
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.