So close to getting this working but myproject produces a SSL_error. I had to make a few changes along the way. For instance, pipenv didn't install well without using sudo.
I thought the problem was where pipenv installed my virtual environment. It is not in /var/www/myproject/.venv but way down in /home/pi/.local somewhere but changing folder to this didn't solve the problem.
sudo systemctl status myproject.service produces the following error:
myproject.service:9: Missing '='.
It looks like you have a syntax error in the myproject.service file. It appears that you are missing an equal sign somewhere. Check this file /etc/systemd/system/myproject.service for syntax errors.
Yes! Application deployed. Thanks for the quick answer, it gave me reassurance that my problem had to be something simple. To start with I didn't realize that the unix statement was a continuation of the ExecStart line, not a new line. I fixed this early-on but didn't restart the service after I did the daemon-reload so my mistake remained!
After a successful launch, I rebooted the computer and Gunicorn didn't start. I added Environment="PATH=/var/www/myproject/.venv/bin" to myproject.service and that seems to have solved problem.
Thanks for writing this step-by-step article.
Unfortunately, this line in the myproject.service file was wrapped due to the formatting. I added a backslash to the line to resolve the issue. Now it will read as one long line.
So close to getting this working but myproject produces a SSL_error. I had to make a few changes along the way. For instance, pipenv didn't install well without using sudo.
I thought the problem was where pipenv installed my virtual environment. It is not in /var/www/myproject/.venv but way down in /home/pi/.local somewhere but changing folder to this didn't solve the problem.
sudo systemctl status myproject.service produces the following error:
myproject.service:9: Missing '='.
Any ideas on where to go looking to fix this?
It looks like you have a syntax error in the myproject.service file. It appears that you are missing an equal sign somewhere. Check this file
/etc/systemd/system/myproject.service
for syntax errors.Yes! Application deployed. Thanks for the quick answer, it gave me reassurance that my problem had to be something simple. To start with I didn't realize that the unix statement was a continuation of the ExecStart line, not a new line. I fixed this early-on but didn't restart the service after I did the daemon-reload so my mistake remained!
After a successful launch, I rebooted the computer and Gunicorn didn't start. I added Environment="PATH=/var/www/myproject/.venv/bin" to myproject.service and that seems to have solved problem.
Thanks for writing this step-by-step article.
Unfortunately, this line in the
myproject.service
file was wrapped due to the formatting. I added a backslash to the line to resolve the issue. Now it will read as one long line.Thanks for letting people know about the
Environment="PATH=...."
issue. I did not need that variable.