Werkzeug is an HTTP and WSGI toolkit for Python that PieCrust uses to run the
preview server when you invoke chef serve
. It can be used to serve PieCrust
using the very popular Apache web server, but has several other ways to work, as
listed on the Werkzeug application deployment documentation.
Whether you’ll be using mod_wsgi
or FastCGI, you’ll need a WSGI
application for your PieCrust website. This is how you do it:
from piecrust.wsgiutil import get_app
application = get_app('/path/to/website/rootdir')
You can then follow the rest of the Werkzeug deployment instructions, which mostly includes setting up an Apache configuration section for your website.