1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-06 16:00:28 +01:00
WGDashboard/src/gunicorn.conf.py

22 lines
745 B
Python
Raw Normal View History

2021-10-18 01:24:09 +02:00
import dashboard
2024-08-05 01:45:28 +02:00
from datetime import datetime
2024-08-03 03:48:42 +02:00
global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger
2024-06-17 21:40:25 +02:00
app_host, app_port = dashboard.gunicornConfig()
2024-08-05 01:45:28 +02:00
date = datetime.today().strftime('%Y_%m_%d_%H_%M_%S')
worker_class = 'gthread'
2024-08-03 19:25:57 +02:00
workers = 1
threads = 1
2021-10-18 01:24:09 +02:00
bind = f"{app_host}:{app_port}"
daemon = True
2024-08-05 00:59:45 +02:00
pidfile = './gunicorn.pid'
2024-08-05 01:32:16 +02:00
wsgi_app = "dashboard:app"
2024-08-05 02:22:41 +02:00
access_log = f"./log/access_{date}.log"
2024-08-05 01:35:59 +02:00
log_level = "debug"
capture_output = True
2024-08-05 02:22:41 +02:00
error_log = f"./log/error_{date}.log"
2024-08-05 02:13:17 +02:00
print(f"[WGDashboard] WGDashboard w/ Gunicorn will be running on {bind}", flush=True)
2024-08-05 02:22:41 +02:00
print(f"[WGDashboard] Access log file is at ./log/{access_log}", flush=True)
print(f"[WGDashboard] Error log file is at ./log/{error_log}", flush=True)