Files
executor/check_settings.py
Jongheon Kim 9c41a458cb Fix STATIC_ROOT configuration and improve production settings
- Add STATIC_ROOT and MEDIA_ROOT settings with environment variable support
- Update settings.py to use environment variables for SECRET_KEY, DEBUG, ALLOWED_HOSTS, TIME_ZONE
- Improve docker-entrypoint.sh to auto-create static/media directories
- Always run collectstatic in Docker (not just production)
- Add check_settings.py script for configuration verification
- Add PRODUCTION_CHECKLIST.md for deployment guide
- Update .env.example with all configuration options
- Update .gitignore for proper static/media file handling

This fixes the ImproperlyConfigured error when deploying with Docker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 00:17:29 +09:00

53 lines
1.3 KiB
Python
Executable File

#!/usr/bin/env python
"""Django 설정 확인 스크립트"""
import os
import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'executor.settings')
django.setup()
from django.conf import settings
print("="*80)
print("Django 설정 확인")
print("="*80)
print()
print("기본 설정:")
print(f" DEBUG: {settings.DEBUG}")
print(f" SECRET_KEY: {'***' + settings.SECRET_KEY[-10:] if len(settings.SECRET_KEY) > 10 else '***'}")
print(f" ALLOWED_HOSTS: {settings.ALLOWED_HOSTS}")
print()
print("데이터베이스:")
print(f" ENGINE: {settings.DATABASES['default']['ENGINE']}")
print(f" NAME: {settings.DATABASES['default']['NAME']}")
print()
print("정적 파일:")
print(f" STATIC_URL: {settings.STATIC_URL}")
print(f" STATIC_ROOT: {settings.STATIC_ROOT}")
print(f" STATIC_ROOT 존재: {os.path.exists(settings.STATIC_ROOT)}")
print()
print("미디어 파일:")
print(f" MEDIA_URL: {settings.MEDIA_URL}")
print(f" MEDIA_ROOT: {settings.MEDIA_ROOT}")
print(f" MEDIA_ROOT 존재: {os.path.exists(settings.MEDIA_ROOT)}")
print()
print("국제화:")
print(f" TIME_ZONE: {settings.TIME_ZONE}")
print(f" LANGUAGE_CODE: {settings.LANGUAGE_CODE}")
print()
print("설치된 앱:")
for app in settings.INSTALLED_APPS:
print(f" - {app}")
print()
print("="*80)
print("설정 확인 완료!")
print("="*80)