Initial commit
This commit is contained in:
18
systemd/gunicorn.service
Normal file
18
systemd/gunicorn.service
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=gunicorn daemon
|
||||
Requires=gunicorn.socket
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=motus
|
||||
RuntimeDirectory=gunicorn
|
||||
WorkingDirectory=/home/motus/motus_remote/web
|
||||
ExecStart=/bin/bash -c "/home/motus/.local/bin/pipenv run gunicorn wsgi:app"
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
KillMode=mixed
|
||||
TimeoutStopSec=5
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
9
systemd/gunicorn.socket
Normal file
9
systemd/gunicorn.socket
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=gunicorn socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/gunicorn.sock
|
||||
SocketUser=nginx
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
19
systemd/rqworker@.service
Normal file
19
systemd/rqworker@.service
Normal file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=RQ Worker Number %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=motus
|
||||
Type=simple
|
||||
WorkingDirectory=/home/motus/motus_remote/web
|
||||
Environment=LANG=en_GB.UTF-8
|
||||
Environment=LC_ALL=en_GB.UTF-8
|
||||
Environment=LC_LANG=en_GB.UTF-8
|
||||
ExecStart=/bin/bash -c "/home/motus/.local/bin/pipenv run rq worker motus"
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
PrivateTmp=true
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user