I have two django projects
running on different ports in same ec2 instance
, One I have configured with gunicorn system as follows by creating gunicorn.service
file at /etc/systemd/system/
which is working awesome if I run the command systemctl start gunicorn
. Now I want to run another proect, how can I configure it, currently I am running that using gunicorn command /usr/local/bin/gunicorn --graceful-timeout 30 --bind 0.0.0.0:8690 projectFile.wsgi:application --daemon
, Can I add same in gunicorn.service
itself. How do I configure multiple projects in gunicorn systemd
?
gunicron.service file -
[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
Just create two .service
file, and start them separately...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With