0π
β
I know this isnβt the best way, but I was able to get it working by adding gunicorn to the list of django INSTALLED_APPS. Then I just created a new systemd service:
[Unit]
Description=hack way to start gunicorn and django
[Service]
User=http
Group=http
ExecStart=/srv/http/www/nlp.com/nlp/bin/python /srv/http/www/nlp.com/nlp/nlp/manage.py run_gunicorn
Restart=always
[Install]
WantedBy=multi-user.target
There must be a better way, but judging by the lack of responses not many people know what that better way is.
π€noel
0π
I had a similar problem on OSX with launchd.
The issue was I needed to allow for the process to spawn sub processes.
Try adding Type=forking
:
[Unit]
Description=gunicorn-app
[Service]
Type=forking
π€user1690442
- [Django]-Django aggregation across multiple tables in ModelAdmin queryset
- [Django]-Tastypie-nonrel, django, mongodb: too many nestings
- [Django]-Is there an easy way reverse a template render?
Source:stackexchange.com