service does not start in ubuntu
I did it as it was in the tutorial on DigitalOcean https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04#step-4-%E2%80%94-configuring-gunicorn
I created a file with the .service extension and shoved this
[Unit]
Description=Gunicorn instance to serve myproject
After=network.target
[Service]
User=user
Group=www-data
WorkingDirectory=/home/user/myproject
Environment="PATH=/home/user/myproject/myprojectenv/bin"
ExecStart=/home/user/myproject/myprojectenv/bin/gunicorn --workers 3 --bind unix:myproject.sock -m 007 wsgi:app
Introduced sudo sysytemctl daemon-reload, systemctl start myproject,systemctl enable myproject
After that, I registered the status and got this error
Jan 10 16:35:44 ubuntu-s-2vcpu-4gb-fra1-01 systemd[1]: Started Gunicorn instance to serve myproject.
Jan 10 16:35:44 ubuntu-s-2vcpu-4gb-fra1-01 systemd[11584]: myproject.service: Failed to execute command: No such file or directory
Jan 10 16:35:44 ubuntu-s-2vcpu-4gb-fra1-01 systemd[11584]: myproject.service: Failed at step EXEC spawning /home/user/myproject/.virtualenvs/myp
Jan 10 16:35:44 ubuntu-s-2vcpu-4gb-fra1-01 systemd[1]: myproject.service: Main process exited, code=exited, status=203/EXEC
Jan 10 16:35:44 ubuntu-s-2vcpu-4gb-fra1-01 systemd[1]: myproject.service: Failed with result 'exit-code'.
Upd: the service is working, but the app is not working , what could be the problem?
0
1 answers
Try it better
EnvironmentFile=/home/user/myproject/myprojectenv/bin/activate
0
Author: eri, 2019-01-10 22:51:44