Answer the question
In order to leave comments, you need to log in
How to deploy multiple projects on uWSGI?
Hello. I've been struggling with the problem for the third day, I need help.
Problem:
There are two projects, one on django, the other on flask, you need to deploy them on VPS (Nginx + uWSGI). I set up Nginx without problems, but I can’t figure it out with uWSGI.
Settings:
Each project has its own virtual environment with installed dependencies (python 3.6.6). The system itself has python2.7 and python3.5 installed (version 3.6 compiled from source and put in /opt, from which virtualenvs were made).
uWSGI is installed system wide.
configs:
[uwsgi]
emperor = /home/teslik/webapps/.uwsgi
uid = www-data
gid = www-data
master = true
enable-threads = true
[uwsgi]
socket = /tmp/blog.sock
chmod-socket = 666
chown-socket = www-data:www-data
logfile-chown = true
processes = 1
threads = 2
virtualenv = /home/teslik/webapps/.virtualenvs/blog
chdir = /home/teslik/webapps/apps/blog
wsgi-file = TeslikBlog/wsgi.py
vacuum = true
plugin = python3
logto = /home/teslik/webapps/.logs/blog/uwsgi.log
[uwsgi]
socket = /tmp/cryptobot.sock
chmod-socket = 666
chown-socket = www-data:www-data
logfile-chown = true
processes = 1
threads = 2
virtualenv = /home/teslik/webapps/.virtualenvs/cryptobot
chdir = /home/teslik/webapps/apps/cryptobot/app
module = bot:app
vacuum = true
plugin = python3
logto = /home/teslik/webapps/.logs/cryptobot/uwsgi.log
Answer the question
In order to leave comments, you need to log in
> python3.7 -m venv env
> ./env/bin/pip3.7 install flask
> ./env/bin/pip3.7 install uwsgi
> ./env/bin/uwsgi --python-version
3.7.0
> uwsgi --file app.py -s :80
['.', '', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages']
> ./env/bin/uwsgi --file app.py -s :80
['.', '', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/tmp/env/lib/python3.7/site-packages']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question