# Custom Configuration This directory allows you to customize MediaCMS without modifying the codebase or rebuilding images. ## How It Works - Production Ready! **The Flow:** ``` 1. CI/CD builds base image: docker build (no custom files) ↓ Pushes to Docker Hub 2. Production pulls image: docker compose pull ↓ Mounts custom/ directory 3. You add files: custom/static/css/custom.css custom/static/images/logo.png ↓ Nginx serves directly! 4. You reference in settings: EXTRA_CSS_PATHS = ["/custom/static/css/custom.css"] PORTAL_LOGO_DARK_PNG = "/custom/static/images/logo.png" ↓ Restart containers 5. Done! No rebuild needed! ``` **Key Points:** - ✅ Files go in `custom/static/` on your host - ✅ Nginx serves them directly from `/custom/static/` URL - ✅ **NO rebuild needed** - just restart containers! - ✅ Works with pre-built images from Docker Hub - ✅ Perfect for production deployments ## Quick Start ### Option 1: No Customization (Default) Just run docker compose - everything works out of the box: ```bash docker compose up -d ``` ### Option 2: With Customization Add your custom files, then restart: ```bash # 1. Copy example settings cp custom/local_settings.py.example custom/local_settings.py # 2. Edit settings nano custom/local_settings.py # 3. Restart containers (no rebuild!) docker compose restart web celery_beat celery_short celery_long ``` ## Customization Options ### 1. Django Settings (`local_settings.py`) **Create the file:** ```bash cp custom/local_settings.py.example custom/local_settings.py ``` **Edit with your settings:** ```python # custom/local_settings.py DEBUG = False ALLOWED_HOSTS = ['example.com'] PORTAL_NAME = "My Media Site" ``` **Apply changes (restart only - no rebuild):** ```bash docker compose restart web celery_beat celery_short celery_long ``` ### 2. Custom Logo **Add your logo:** ```bash cp ~/my-logo.png custom/static/images/logo_dark.png ``` **Reference it in settings:** ```bash cat >> custom/local_settings.py < custom/static/css/custom.css <> custom/local_settings.py < custom/static/css/custom.css # 4. Configure settings to use them cat >> custom/local_settings.py <