mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 21:52:55 +00:00
- 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>
26 lines
639 B
Python
26 lines
639 B
Python
"""
|
|
WSGI config for netcop_hub project.
|
|
|
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
|
|
For more information on this file, see
|
|
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')
|
|
|
|
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)
|