REMOVE LDAP

This commit is contained in:
beabigegg
2025-09-25 08:44:44 +08:00
commit 333a640a3b
53 changed files with 4231 additions and 0 deletions

27
wsgi.py Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python3
"""
WSGI 生產環境入口點
用於Gunicorn部署
"""
import os
import logging
import sys
from app import app
# 配置生產環境日誌
if __name__ != "__main__":
# 只在Gunicorn環境下配置日誌
gunicorn_logger = logging.getLogger('gunicorn.error')
app.logger.handlers = gunicorn_logger.handlers
app.logger.setLevel(gunicorn_logger.level)
# 確保在生產環境
os.environ['FLASK_ENV'] = 'production'
if __name__ == "__main__":
# 開發環境直接運行
print("🚀 開發環境啟動")
app.run(host='0.0.0.0', port=5000, debug=False)
else:
# 生產環境通過Gunicorn
print("🌟 生產環境啟動 (Gunicorn)")