diff --git a/systemd/romstore.service b/systemd/romstore.service new file mode 100644 index 0000000..2e2219b --- /dev/null +++ b/systemd/romstore.service @@ -0,0 +1,13 @@ +[Unit] +Description=romstore uWSGI app +After=syslog.target + +[Service] +ExecStart=/home/romstore/gulasch-r0mstore/virtenv/bin/uwsgi \ + --ini /home/romstore/gulasch-r0mstore/uwsgi.ini + +Restart=on-failure +KillSignal=SIGQUIT +Type=notify +StandardError=syslog +NotifyAccess=all diff --git a/systemd/romstore.socket b/systemd/romstore.socket new file mode 100644 index 0000000..26dd376 --- /dev/null +++ b/systemd/romstore.socket @@ -0,0 +1,11 @@ +[Unit] +Description=Socket for romstore uWSGI + +[Socket] +ListenStream=/var/run/uwsgi/romstore.socket +SocketUser=romstore +SocketGroup=www-data +SocketMode=0666 + +[Install] +WantedBy=sockets.target diff --git a/systemd/systemd_uwsgi.ini b/systemd/systemd_uwsgi.ini new file mode 100644 index 0000000..74e66ef --- /dev/null +++ b/systemd/systemd_uwsgi.ini @@ -0,0 +1,12 @@ +[uwsgi] +chdir=/home/romstore/gulasch-r0mstore/ +home=/home/romstore/gulasch-r0mstore/virtenv +module=gulaschromstore.wsgi:application +master=True +socket=/var/run/uwsgi/romstore.socket +processes=5 +harakiri=20 +max-requests=5000 +vacuum=True +max-requests=5000 +env = LANG=de_DE.UTF-8