1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

Update gunicorn.conf.py

This commit is contained in:
Donald Zou 2024-08-04 19:45:28 -04:00
parent 2c3500315d
commit 5755d13460

View File

@ -1,8 +1,9 @@
import multiprocessing
import dashboard import dashboard
from datetime import datetime
global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger
app_host, app_port = dashboard.gunicornConfig() app_host, app_port = dashboard.gunicornConfig()
date = datetime.today().strftime('%Y_%m_%d_%H_%M_%S')
worker_class = 'gthread' worker_class = 'gthread'
workers = 1 workers = 1
@ -11,7 +12,7 @@ bind = f"{app_host}:{app_port}"
daemon = True daemon = True
pidfile = './gunicorn.pid' pidfile = './gunicorn.pid'
wsgi_app = "dashboard:app" wsgi_app = "dashboard:app"
access_logfile = "./log/access.log" access_logfile = f"./log/access_{date}.log"
log_level = "debug" log_level = "debug"
capture_output = True capture_output = True
error_logfile = "./log/error.log" error_logfile = f"./log/error_{date}.log"