31 lines
755 B
Python
31 lines
755 B
Python
|
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
""" Script to launch mandaye with gunicorn server
|
||
|
"""
|
||
|
|
||
|
import os
|
||
|
os.environ['MANDAYE_CONFIG_MODULE'] = 'rp_meyzieu.config'
|
||
|
|
||
|
import sys
|
||
|
|
||
|
from mandaye.log import logger
|
||
|
from gunicorn.app.wsgiapp import WSGIApplication
|
||
|
|
||
|
class MandayeWSGIApplication(WSGIApplication):
|
||
|
|
||
|
def init(self, parser, opts, args):
|
||
|
self.cfg.set("default_proc_name", "rp_meyzieu.wsgi:application_dev")
|
||
|
self.app_uri = "rp_meyzieu.wsgi:application_dev"
|
||
|
|
||
|
def main():
|
||
|
""" The ``gunicorn`` command line runner for launcing Gunicorn with
|
||
|
generic WSGI applications.
|
||
|
"""
|
||
|
logger.info('rp_meyzieu reverse-proxy start')
|
||
|
MandayeWSGIApplication("%(prog)s [OPTIONS]").run()
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|
||
|
|