I am trying to get my gunicorn setup. Following is my config file for the systemmd config file:
# Unit section is used to specify metadata and dependencies
[Unit]
Description=DEMO
# only start once the network target has been reached
After=network.target
# Service section specify the user and group that we want the process to run under
[Service]
# www-data group assigned to facilitate easy communication with nginx
Group=www-data
# path to working directory
WorkingDirectory=/srv/demo/git
# path to virtual environment
Environment="PATH=/srv/demo/git/venv/bin"
ExecStart=/srv/demo/git/venv/bin/gunicorn --workers=5 --bind unix:git.sock --log-level=debug wsgi:app --timeout 3600
#--workers=5 --threads=2 --worker-class=gthread
[Install]
WantedBy=multi-user.target
~
~
~
And my virtual environment folder does contain gunicorn:
But I am still unable to run this, the systemmd file says that it was unable to find gunicorn. No such file or directory:
i have uninstall gunicorn from outside my virtual env. But when i do a which gunicorn it shows me the path to be /usr/bin/gunicorn. When i put this path, it dosnt throw the same error but simply says that the apt_pkg and gunicorn module wasnt found but not a directory error. Is this a path issue? If so how can i fix it?