Piy*_*are 5 django gunicorn systemd server
我有两个django projects在同一端口上的不同端口上运行ec2 instance,其中一个我已经通过使用以下命令配置了gunicorn系统,方法是创建gunicorn.service文件,/etc/systemd/system/如果我运行该命令,该文件将非常有效systemctl start gunicorn。现在我想运行另一个项目,如何配置它,当前我正在使用gunicorn命令运行它,我是否/usr/local/bin/gunicorn --graceful-timeout 30 --bind 0.0.0.0:8690 projectFile.wsgi:application --daemon可以自己添加gunicorn.service它。如何在中配置多个项目gunicorn systemd?
gunicron.service文件-
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
PIDFile=/tmp/gunicorn.pid
LogFile=/tmp/lgunicorn.log
User=root
Group=www-data
WorkingDirectory=/home/ubuntu/website/UniservedWebsite
ExecStart = /usr/local/bin/gunicorn --workers 2 --graceful-timeout 30 --bind 0.0.0.0:8134 UniservedWebsite.wsgi:application
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1535 次 |
| 最近记录: |