summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2020-03-22 17:04:43 -0500
committerBlaise Thompson <blaise@untzag.com>2020-03-22 17:04:43 -0500
commit66d05cb7d012843a6dec0ea72d9af720ac650151 (patch)
tree87399109e5113f465cd9970e848bc06611215976
parentbf06052842c23078fb126c6e06f24f0451936e92 (diff)
-rw-r--r--shopdb.ini11
-rw-r--r--shopdb/app/__init__.py3
-rw-r--r--wsgi.py6
3 files changed, 19 insertions, 1 deletions
diff --git a/shopdb.ini b/shopdb.ini
new file mode 100644
index 0000000..8f55079
--- /dev/null
+++ b/shopdb.ini
@@ -0,0 +1,11 @@
+[uwsgi]
+module = wsgi:app
+
+master = true
+processes = 5
+
+socket = shopdb.sock
+chmod-socket = 660
+vacuum = true
+
+die-on-term = true
diff --git a/shopdb/app/__init__.py b/shopdb/app/__init__.py
index e5ac40c..a5bed18 100644
--- a/shopdb/app/__init__.py
+++ b/shopdb/app/__init__.py
@@ -38,4 +38,5 @@ def inventory():
return render_template("inventory.html")
-app.run(debug=True, port=8000)
+if __name__ == "__main__":
+ app.run(debug=True)
diff --git a/wsgi.py b/wsgi.py
new file mode 100644
index 0000000..31b98ac
--- /dev/null
+++ b/wsgi.py
@@ -0,0 +1,6 @@
+from shopdb import app
+
+app = app.app
+
+if __name__ == "__main__":
+ app.run()