aboutsummaryrefslogtreecommitdiffstats
path: root/docker/app/uwsgi.ini
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-21 21:15:34 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-21 21:15:34 +0200
commitd6bbff585d682266d2c71b2e478ea472dc8cbb2b (patch)
tree15fa55955c17f00479bae5c93f93f95f938f192a /docker/app/uwsgi.ini
parentUse UWSGI protocol. (diff)
Set up graceful shutdown.
Diffstat (limited to '')
-rw-r--r--docker/app/uwsgi.ini27
1 files changed, 22 insertions, 5 deletions
diff --git a/docker/app/uwsgi.ini b/docker/app/uwsgi.ini
index 70a39921..eb5b4ec2 100644
--- a/docker/app/uwsgi.ini
+++ b/docker/app/uwsgi.ini
@@ -1,17 +1,34 @@
[uwsgi]
-# Exposed ports
+### Exposed ports
+# uWSGI protocol socket
socket = :4000
-# File settings
+### File settings
+# WSGI application
wsgi = pysite.wsgi:application
+# Directory to move into at startup
chdir = /app
-# Concurrency options
+### Concurrency options
+# Run a master to supervise the workers
master = true
-threads = 2
+# Keep a minimum of 1 worker
+cheaper = 1
+# Allow a maximum of 4 workers
+workers = 4
+# Check how busy our workers are every 10 seconds
+cheaper-overload = 10
+# Automatically set up meanginful process names
auto-procname = true
+# Prefix process names with `pysite : `
procname-prefix-spaced = pysite :
-# Startup settings
+### Startup settings
+# Exit if we can't load the app
need-app = true
+# `setuid` to an unprivileged user
uid = 1500
+
+### Hook setup
+# Gracefully kill workers on `SIGQUIT`
+hook-master-start = unix_signal:3 gracefully_kill_them_all