From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3C4156DE01D0 for ; Sun, 4 Feb 2018 20:20:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=-0.007] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r621k8s6EtXM for ; Sun, 4 Feb 2018 20:20:12 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 2EAA56DE020B for ; Sun, 4 Feb 2018 20:20:11 -0800 (PST) Received: from fifthhorseman.net (ool-6c3a0662.static.optonline.net [108.58.6.98]) by che.mayfirst.org (Postfix) with ESMTPSA id 57F5EF99E for ; Sun, 4 Feb 2018 23:20:10 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id AB42D21949; Sun, 4 Feb 2018 23:20:05 -0500 (EST) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH 07/11] nmweb: shim for launching from gunicorn Date: Sun, 4 Feb 2018 23:19:55 -0500 Message-Id: <20180205041959.22066-8-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180205041959.22066-1-dkg@fifthhorseman.net> References: <20180205041959.22066-1-dkg@fifthhorseman.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 04:20:13 -0000 file:///usr/share/doc/python-webpy-doc/html/deploying.html suggests that gunicorn is an efficient way to deploy a webpy-based WSGI daemon. This script is glue between nmweb.py and gunicorn. --- contrib/notmuch-web/nmgunicorn.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 contrib/notmuch-web/nmgunicorn.py diff --git a/contrib/notmuch-web/nmgunicorn.py b/contrib/notmuch-web/nmgunicorn.py new file mode 100644 index 00000000..e71ba12a --- /dev/null +++ b/contrib/notmuch-web/nmgunicorn.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +# to launch nmweb from gunicorn. + +from nmweb import urls, index, search, show +import web + +app = web.application(urls, globals()) + +# get the wsgi app from web.py application object +wsgiapp = app.wsgifunc() -- 2.15.1