在this文章之后在一个VM上设置django,这就是我如何设置gunicorn systemd的方法
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=muiruri_samuel
Group=www-data
WorkingDirectory=/home/muiruri_samuel/webapp
ExecStart=/home/muiruri_samuel/webapp/djangoenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/muiruri_samuel/webapp/revamp/revamp.sock revamp.wsgi:application
[Install]
WantedBy=multi-user.target
当我检查状态时,我是如何创建这个的
^{pr2}$这就是wsgi文件。我知道的wsgi文件存在于此/home/muiruri_samuel/webapp/revamp/revamp\wsgi.py
对于普通的Django项目布局,
WorkingDirectory
应该是包含manage.py
的那个。看起来你正在使用上面的目录。尝试将其更改为:相关问题 更多 >
编程相关推荐