0
我在网上的例子中拼凑了下面的uWSGI配置文件。 (◠﹏◠)如何告诉systemd启动的uWSGI守护进程使用特定的python?
鉴于此配置 - 驻留在/etc/uwsgi.d/myapp.ini
和被用于启动uwsgi
守护进程,反过来,通过myapp
systemd/systemctl
- 这配置指令做我用它告诉使用特定的虚拟环境PYTHON for myapp
?
是不是home =
?
换句话说,当它调用django.wsgi
应用程序时,我该如何告诉它(或它是如何知道的):/home/myapp_unixHome/.virtualenvs/myapp/bin/python
?
[uwsgi]
# =======================================================
# Directories ...
# =======================================================
home = /home/myapp_unixHome/.virtualenvs/myapp/ <--- Python virtualenv dir.
chdir = /home/myapp_unixHome/myapp/ <--- Django App here.
wsgi-file = /home/myapp_unixHome/myapp/django.wsgi <--- Including this django.wsgi file.
static-map = /m=/home/myapp_unixHome/myapp/static/ <--- Static files.
# =======================================================
# =======================================================
# TO BE NAMED ...
# =======================================================
master = true
processes = 5
# =======================================================
# =======================================================
# myapp communicates w/ nginx via a UNIX domain socket.
# =======================================================
socket = /run/uwsgi/myapp.sock
chmod-socket = 664
uid = nginx
gid = nginx
vacuum = true
# =======================================================
# =======================================================
# uWSGI Log file.
# =======================================================
logto = /var/log/uwsgi.log
# =======================================================
谢谢。
谢谢@gautamaggarwal。我仔细看了看(在文档中),但找不到它。谢谢。 –