synesthesiam / docker-mozillatts

Docker image for Mozilla TTS server
MIT License
183 stars 36 forks source link

Migrate away from Flask's HTTP server #15

Open tslmy opened 3 years ago

tslmy commented 3 years ago

First of all -- Thanks for putting together this repo and hosting these images.

Currently, the Docker images built by this repo is using Flask as a HTTP server:

mozillatts_1  |  * Serving Flask app "mozillatts" (lazy loading)
mozillatts_1  |  * Environment: production
mozillatts_1  |    WARNING: This is a development server. Do not use it in a production deployment.
mozillatts_1  |    Use a production WSGI server instead.

As the official documentation indicates, Flask’s built-in server is not suitable for production as it doesn’t scale well. This goes against the philosophy of containerization in the first place and is subject to security issues.

Kindly consider migrate to other HTTP server implementations such as gunicorn.

laundmo commented 3 years ago

i personally like and recommend using the tiangolo meinheld/gunicorn image that can be found here https://github.com/tiangolo/meinheld-gunicorn-flask-docker

synesthesiam commented 3 years ago

I've migrated to Coqui TTS, the successor to Mozilla TTS. The new Docker images are available here: https://github.com/synesthesiam/coqui-docker/ (still using the default Flask server, unfortunately).

My Larynx TTS project is using hypercorn, though.