forked from mirrors/thatmattlove-hyperglass
gunicorn & wsgi config changes
This commit is contained in:
parent
7d0e46bc1f
commit
9010542127
2 changed files with 13 additions and 11 deletions
|
|
@ -1,8 +1,17 @@
|
|||
import multiprocessing
|
||||
|
||||
command = "/usr/local/bin/gunicorn"
|
||||
pythonpath = "/opt/hyperglass/hyperglass"
|
||||
pythonpath = "/opt/hyperglass"
|
||||
bind = "[::1]:8001"
|
||||
preload = True
|
||||
workers = multiprocessing.cpu_count() * 2
|
||||
user = "www-data"
|
||||
timeout = 60
|
||||
keepalive = 10
|
||||
|
||||
|
||||
def on_starting(server):
|
||||
import hyperglass
|
||||
|
||||
hyperglass.render.css.renderTemplate()
|
||||
print(1)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import hyperglass
|
||||
from hyperglass.hyperglass import app
|
||||
import hyperglass.hyperglass
|
||||
|
||||
application = app
|
||||
application = hyperglass.hyperglass.app
|
||||
|
||||
hyperglass_root = os.path.dirname(hyperglass.__file__)
|
||||
static = os.path.join(hyperglass_root, "static")
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
hyperglass.render.css.renderTemplate()
|
||||
hyperglass.render.html.renderTemplate()
|
||||
application.run(static_folder=static)
|
||||
except:
|
||||
raise
|
||||
application.run(static_folder=static)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue