我遵循这个article来部署我的Django项目。我使用以下配置在/etc/systemd/system/gunicorn.service
中创建了gunicorn.service
文件:
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=azizbek
Group=www-data
WorkingDirectory=/home/admin/respositories/ninersComingSoon
ExecStart=/root/.local/share/virtualenvs/ninersComingSoon-_UZsUc5R/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/admin/repositories/ninersComingSoon/niners.sock ninersComingSoon.wsgi:application
[Install]
WantedBy=multi-user.target
我的项目位置是/home/admin/respositories/ninersComingSoon
当我跑的时候
^{pr2}$它必须在项目目录中创建niners.sock
文件,但它没有
然后我输入这个命令来找出我做错了什么。
journalctl -u gunicorn
结果是
Dec 05 02:05:26 server.niners.uz systemd[1]: Started gunicorn daemon.
Dec 05 02:05:26 server.niners.uz systemd[1]: gunicorn.service: Main process exited, code=exited, status=203/EXEC
Dec 05 02:05:26 server.niners.uz systemd[1]: gunicorn.service: Unit entered failed state.
Dec 05 02:05:26 server.niners.uz systemd[1]: gunicorn.service: Failed with result 'exit-code'.
你能帮我解决这个问题吗?
问题出在
WorkingDirectory
。路径不正确。应该有.../repositories/...
而不是.../respositories/...
相关问题 更多 >
编程相关推荐