Skip to content

Commit

Permalink
feat: adds systemd socket for uwsgi listen on
Browse files Browse the repository at this point in the history
  • Loading branch information
norwoodj committed Aug 28, 2021
1 parent 996c924 commit 97471d5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/RPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app_secret_key: !IncludeText
- flask-app-secret-key

MONGODB_SETTINGS:
host: rp3-smi-mdb-000
host: 0p0
username: stupidchess-rw
password: !IncludeText
filename: !JoinFilePaths
Expand Down
1 change: 1 addition & 0 deletions debian/stupidchess-uwsgi.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=uWSGI for stupidchess
After=syslog.target
Requires=stupidchess-uwsgi.socket

[Service]
ExecStart=/opt/venvs/stupidchess-uwsgi/bin/uwsgi --ini /opt/stupidchess/uwsgi.ini:deployed
Expand Down
10 changes: 10 additions & 0 deletions debian/stupidchess-uwsgi.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=stupidchess uwsgi listen socket
PartOf=stupidchess-uwsgi.service

[Socket]
FileDescriptorName=stupidchess-uwsgi
ListenStream=/opt/stupidchess/sockets/stupidchess.sock

[Install]
WantedBy=sockets.target
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Flask-WTF==0.14.2
Flask==0.11.1
Jinja2==2.9.6
MarkupSafe==1.0
PyYAML==3.12
PyYAML==5.1
WTForms==2.1
Werkzeug==0.12.2
bcrypt==3.1.0
Expand Down

0 comments on commit 97471d5

Please sign in to comment.