File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Link to /etc/systemd/system/wut.sh-gunicorn.service
2+ # After update, run: `sudo systemctl daemon-reload && sudo service wut.sh-gunicorn reload`
3+
4+ [Unit]
5+ Description =gunicorn daemon for wut.sh
6+ Requires =wut.sh-gunicorn.socket
7+ After =network.target
8+
9+ [Service]
10+ Type =notify
11+ # the specific user that our service will run as
12+ User =webadmin
13+ Group =adm
14+ # another option for an even more restricted service is
15+ # DynamicUser=yes
16+ # see http://0pointer.net/blog/dynamic-users-with-systemd.html
17+ #RuntimeDirectory=wut.sh-gunicorn
18+ #WorkingDirectory=/var/www/wut.sh
19+ ExecStart =/var/www/wut.sh/venv/bin/gunicorn \
20+ --chdir /var/www/wut.sh/server \
21+ -b unix:/run/wut.sh-gunicorn.sock \
22+ -w 3 \
23+ #-e DJANGO_SETTINGS_MODULE="config.settings_production" \
24+ -e DJANGO_SETTINGS_MODULE ="config.settings" \
25+ --capture-output \
26+ --log-file /var/log/gunicorn/wut.sh.log \
27+ config.wsgi
28+ ExecReload =/bin/kill -s HUP $MAINPID
29+ KillMode =mixed
30+ TimeoutStopSec =5
31+ PrivateTmp =true
32+
33+ [Install]
34+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change 1+ # Link to /etc/nginx/sites-enabled/wut.sh
12#* Reference: https://docs.gunicorn.org/en/latest/deploy.html
23
34# Expires map for file TTL
You can’t perform that action at this time.
0 commit comments