mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 07:32:55 +00:00
Add Django startup debugging to wsgi.py
- Add try/catch around get_wsgi_application() to capture startup errors - Print detailed error messages and traceback for debugging - Exit with error code 1 on failure to ensure container fails fast - This will help diagnose the silent Django startup failure in Dokploy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e7fef02176
commit
9ee78fc770
@ -8,9 +8,18 @@ https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netcop_hub.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
try:
|
||||
application = get_wsgi_application()
|
||||
print("Django WSGI application loaded successfully!")
|
||||
except Exception as e:
|
||||
print(f"FATAL ERROR during Django startup: {e}")
|
||||
print("Full traceback:")
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user