commit ea07c13b7a8f5a043a10176249bf256577008e9c Author: Tait Hoyem Date: Fri Feb 25 18:07:19 2022 -0700 initial commit diff --git a/systemd-service-files/uwsgi.service b/systemd-service-files/uwsgi.service new file mode 100644 index 0000000..3c1333f --- /dev/null +++ b/systemd-service-files/uwsgi.service @@ -0,0 +1,23 @@ +[Unit] +# basic description of service; replace with legit description +Description=A uWSGI service for XYZ + +[Service] +# change lowercase "user" to the user which will be running the program: this is usually the one whoes home directory the project is in +User=user +# change to where the directory of the project is +WorkingDirectory=/my/directory +# leave Type= and RemainAfterExit= alone; these specify the type of program that is being run +Type=simple +RemainAfterExit=yes +# replace "uwsgi" with output of `which uwsgi`; this command will not work the way it is +# also, replace myapp.sock with whatever your socket should be +ExecStart=uwsgi -s /tmp/myapp.sock --manage-script-name --mount /=app:app +# instructions on how to kill the process +ExecStop=/bin/kill -HUP $MAINPID +# if process dies, should you restart it? leave it as always to auto restart +Restart=always + +[Install] +# WantedBy=multi-user.target allows it to be enabled with systemctl to start on boot +WantedBy=multi-user.target