Skip to content

Commit 8549023

Browse files
committed
Update README with Python 3.7 images and as default in docs
1 parent 4fdc3c3 commit 8549023

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Supported tags and respective `Dockerfile` links
22

3+
* [`python3.7` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/python3.7/Dockerfile)
4+
* [`python3.7-alpine3.7` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/python3.7-alpine3.7/Dockerfile)
35
* [`python3.6` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/python3.6/Dockerfile)
46
* [`python3.6-index` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/python3.6-index/Dockerfile)
57
* [`python3.6-alpine3.7` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/python3.6-alpine3.7/Dockerfile)
@@ -21,7 +23,7 @@
2123

2224
# uwsgi-nginx-flask
2325

24-
**Docker** image with **uWSGI** and **Nginx** for **Flask** web applications in **Python 3.6**, **Python 3.5** and **Python 2.7** running in a single container. Optionally using Alpine Linux.
26+
**Docker** image with **uWSGI** and **Nginx** for **Flask** web applications in **Python 3.7**, **Python 3.6**, **Python 3.5** and **Python 2.7** running in a single container. Optionally using Alpine Linux.
2527

2628
## Description
2729

@@ -37,29 +39,29 @@ There is also an Alpine version. If you want it, use one of the Alpine tags from
3739

3840
## Examples (project templates)
3941

40-
* **`python3.6`** tag: general Flask web application:
42+
* **`python3.7`** tag: general Flask web application:
4143

42-
[**example-flask-python3.6.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-python3.6.zip>)
44+
[**example-flask-python3.7.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-python3.6.zip>)
4345

44-
* **`python3.6`** tag: general Flask web application, structured as a package, for bigger Flask projects, with different submodules. Use it only as an example of how to import your modules and how to structure your own project:
46+
* **`python3.7`** tag: general Flask web application, structured as a package, for bigger Flask projects, with different submodules. Use it only as an example of how to import your modules and how to structure your own project:
4547

46-
[**example-flask-package-python3.6.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-package-python3.6.zip>)
48+
[**example-flask-package-python3.7.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-package-python3.6.zip>)
4749

48-
* **`python3.6-index`** tag: `static/index.html` served directly in `/`, e.g. for Angular, React, or any other Single-Page Application that uses a static `index.html`, not modified by Python:
50+
* **`python3.7`** tag: `static/index.html` served directly in `/`, e.g. for Angular, React, or any other Single-Page Application that uses a static `index.html`, not modified by Python:
4951

50-
[**example-flask-python3.6-index.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-python3.6-index.zip>)
52+
[**example-flask-python3.7-index.zip**](<https://github.com/tiangolo/uwsgi-nginx-flask-docker/releases/download/v0.3.5/example-flask-python3.6-index.zip>)
5153

5254
## General Instructions
5355

5456
You don't have to clone this repo, you should be able to use this image as a base image for your project with something in your `Dockerfile` like:
5557

5658
```Dockerfile
57-
FROM tiangolo/uwsgi-nginx-flask:python3.6
59+
FROM tiangolo/uwsgi-nginx-flask:python3.7
5860

5961
COPY ./app /app
6062
```
6163

62-
There are several image tags available for Python 3.6, Python 3.5 and Python 2.7, but for new projects you should use **Python 3.6**.
64+
There are several image tags available for Python 3.7, Python 3.6, Python 3.5 and Python 2.7, but for new projects you should use **Python 3.7**.
6365

6466
As of now, [everyone](https://www.python.org/dev/peps/pep-0373/) [should be](http://flask.pocoo.org/docs/0.12/python3/#python3-support) [using **Python 3**](https://docs.djangoproject.com/en/1.11/faq/install/#what-python-version-should-i-use-with-django).
6567

@@ -70,7 +72,7 @@ This Docker image is based on [**tiangolo/uwsgi-nginx**](https://hub.docker.com/
7072

7173
## QuickStart
7274

73-
**Note**: You can download the **example-flask-python3.6.zip** project example and use it as the template for your project from the section **Examples** above.
75+
**Note**: You can download the **example-flask-python3.7.zip** project example and use it as the template for your project from the section **Examples** above.
7476

7577
---
7678

@@ -80,7 +82,7 @@ Or you may follow the instructions to build your project from scratch:
8082
* Create a `Dockerfile` with:
8183

8284
```Dockerfile
83-
FROM tiangolo/uwsgi-nginx-flask:python3.6
85+
FROM tiangolo/uwsgi-nginx-flask:python3.7
8486

8587
COPY ./app /app
8688
```
@@ -138,7 +140,7 @@ This section explains how to configure the image to serve the contents of `/stat
138140

139141
This is specially helpful (and efficient) if you are building a Single-Page Application (SPA) with JavaScript (Angular, React, etc) and you want the `index.html` to be served directly, without modifications by Python or Jinja2 templates. And you want to use Flask mainly as an API / back end for your SPA front end.
140142

141-
**Note**: You can download the example project **example-flask-python3.6-index.zip** and use it as the template for your project in the **Examples** section above.
143+
**Note**: You can download the example project **example-flask-python3.7-index.zip** and use it as the template for your project in the **Examples** section above.
142144

143145
---
144146

@@ -148,7 +150,7 @@ Or you may follow the instructions to build your project from scratch (it's very
148150
* Create a `Dockerfile` with:
149151

150152
```Dockerfile
151-
FROM tiangolo/uwsgi-nginx-flask:python3.6
153+
FROM tiangolo/uwsgi-nginx-flask:python3.7
152154

153155
ENV STATIC_INDEX 1
154156

@@ -246,7 +248,7 @@ docker run -d --name mycontainer -p 80:80 myimage
246248

247249
## QuickStart for bigger projects structured as a Python package
248250

249-
**Note**: You can download the **example-flask-package-python3.6.zip** project example and use it as an example or template for your project from the section **Examples** above.
251+
**Note**: You can download the **example-flask-package-python3.7.zip** project example and use it as an example or template for your project from the section **Examples** above.
250252

251253
---
252254

@@ -381,7 +383,7 @@ To change this behavior, set the `LISTEN_PORT` environment variable. You might a
381383
You can do that in your `Dockerfile`, it would look something like:
382384

383385
```Dockerfile
384-
FROM tiangolo/uwsgi-nginx-flask:python3.6
386+
FROM tiangolo/uwsgi-nginx-flask:python3.7
385387

386388
ENV LISTEN_PORT 8080
387389

@@ -492,7 +494,7 @@ or you can set it to the keyword `auto` and it will try to autodetect the number
492494
For example, using `auto`, your Dockerfile could look like:
493495

494496
```Dockerfile
495-
FROM tiangolo/uwsgi-nginx-flask:python3.6
497+
FROM tiangolo/uwsgi-nginx-flask:python3.7
496498

497499
ENV NGINX_WORKER_PROCESSES auto
498500

@@ -653,7 +655,7 @@ if __name__ == "__main__":
653655

654656
...and you could run it with `python main.py`. But that will only work when you are not using a package structure and don't plan to do it later. In that specific case, if you didn't add the code block above, your app would only listen to `localhost` (inside the container), in another port (5000) and not in debug mode.
655657

656-
**Note**: The example project **example-flask-python3.6** includes a `docker-compose.yml` and `docker-compose.override.yml` with all these configurations, if you are using Docker Compose.
658+
**Note**: The example project **example-flask-python3.7** includes a `docker-compose.yml` and `docker-compose.override.yml` with all these configurations, if you are using Docker Compose.
657659

658660
---
659661

@@ -695,7 +697,7 @@ def route_frontend(path):
695697

696698
That's how it is written in the tutorial above and is included in the downloadable examples.
697699

698-
**Note**: The example project **example-flask-python3.6-index** includes a `docker-compose.yml` and `docker-compose.override.yml` with all these configurations, if you are using Docker Compose.
700+
**Note**: The example project **example-flask-python3.7-index** includes a `docker-compose.yml` and `docker-compose.override.yml` with all these configurations, if you are using Docker Compose.
699701

700702
## More advanced development instructions
701703

@@ -737,6 +739,10 @@ You will see your Flask debugging server start, you will see how it sends respon
737739

738740
## What's new
739741

742+
2018-09-22:
743+
744+
* 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](https://github.com/desaintmartin) in [this PR](https://github.com/tiangolo/uwsgi-nginx-flask-docker/pull/82).
745+
740746
2018-06-22:
741747

742748
* 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](https://github.com/ronlut) in [this PR](https://github.com/tiangolo/uwsgi-nginx-flask-docker/pull/56).

0 commit comments

Comments
 (0)