I'm trying to deploy my Django app on DigitalOcean (i've been following the "How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu" tutorial) but I'm stuck on running gunicorn.service. I'm able to start and enable it fine with systemctl, but when I try running "curl --unix-socket /run/gunicorn.sock localhost" it keeps returning errors. My service file looks like this:
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=root
Group=www-data
WorkingDirectory=/root/myprojectdir
ExecStart=/root/myprojectdir/myprojectenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
myapp.wsgi:application
[Install]
WantedBy=multi-user.target```
In journalctl, initially it just gave "gunicorn.service: Failed with result 'exit-code'." but after trying some bug fixes, it looks like it is able to start but gives a ModuleNotFoundError for my app name.