cannot use custom uwsgi.ini in flask app
See original GitHub issueHi tiangolo!
I’ve been working around with your docker image to deploy my python application.
Things were fine until I tried customizing uwsgi.ini file.
First of all, following is my flask project architecture.
Inside my Dockerfile includes following lines.
FROM tiangolo/uwsgi-nginx-flask:python3.6
COPY ./app /app
COPY ./app/conf/nginx.conf /etc/nginx/
COPY ./uwsgi.ini /app/uwsgi.ini
COPY ./requirements.txt /app/
RUN pip install -r /app/requirements.txt
ENV UWSGI_INI /app/uwsgi.ini
and I also tried with following Dockerfile.
FROM tiangolo/uwsgi-nginx-flask:python3.6
COPY ./app /app
COPY ./app/conf/nginx.conf /etc/nginx/
COPY ./uwsgi.ini /app/uwsgi.ini
COPY ./requirements.txt /app/
RUN pip install -r /app/requirements.txt
ENV UWSGI_INI /app/uwsgi.ini
WORKDIR /app
My custom uwsgi.ini is as follows.
[uwsgi]
module = main
callable = app
lazy-apps = true
processes = 1
If I run a docker container with above image, I see following logs.
Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Can not reach Flask app served with uWSGI and Nginx
Then I use this command to start the app: uwsgi --ini uwsgi.ini. The message returned is. WSGI app 0 (mountpoint='') ready in 9...
Read more >uWSGI cannot find “application” using Flask and Virtualenv
This is the error im getting using uwsgi on my webserver *** Operational MODE: single process *** ModuleNotFoundError: No module named 'app' ...
Read more >How To Serve Flask Applications with uWSGI ... - DigitalOcean
In this guide, we will be setting up a simple Python application using the Flask microframework on Ubuntu 18.04. The bulk of this...
Read more >Deploy Flask Applications with uWSGI and Nginx
Host Python apps on your own server. Set up uWSGI to serve your app concurrently while handling incoming traffic with Nginx.
Read more >Serving Flask Applications with uWSGI - jdhao's digital space
Save this file as uwsgi.ini (or whatever you like), and then run the application using uwsgi --ini uwsgi.ini . If the extension of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If it can help, I solved by replace :
from flask.ext.mongoengine import MongoEngineby :
from flask_mongoengine import MongoEngineThanks for the comment!! I’ll go over the links you’ve attached! And since I’m done with this specific issue, I think it’s better to close it.