|
| 1 | +# MediaCMS 7.3 - Quick Start |
| 2 | + |
| 3 | +## Minimal Deployment (No Code Required!) |
| 4 | + |
| 5 | +MediaCMS 7.3 can be deployed with **just 2 files**: |
| 6 | + |
| 7 | +1. `docker-compose.yaml` |
| 8 | +2. `custom/` directory (optional) |
| 9 | + |
| 10 | +**No git repo, no code checkout needed!** Everything runs from Docker images. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Fresh Installation |
| 15 | + |
| 16 | +### 1. Create deployment directory |
| 17 | + |
| 18 | +```bash |
| 19 | +mkdir mediacms && cd mediacms |
| 20 | +``` |
| 21 | + |
| 22 | +### 2. Download docker-compose.yaml |
| 23 | + |
| 24 | +```bash |
| 25 | +wget https://raw.githubusercontent.com/mediacms-io/mediacms/v7.3/docker-compose.yaml |
| 26 | +``` |
| 27 | + |
| 28 | +Or with curl: |
| 29 | +```bash |
| 30 | +curl -O https://raw.githubusercontent.com/mediacms-io/mediacms/v7.3/docker-compose.yaml |
| 31 | +``` |
| 32 | + |
| 33 | +### 3. Start MediaCMS |
| 34 | + |
| 35 | +```bash |
| 36 | +docker compose up -d |
| 37 | +``` |
| 38 | + |
| 39 | +### 4. Access your site |
| 40 | + |
| 41 | +- **Frontend**: http://localhost |
| 42 | +- **Admin**: http://localhost/admin |
| 43 | + - Username: `admin` |
| 44 | + - Password: Check logs for auto-generated password: |
| 45 | + ```bash |
| 46 | + docker compose logs migrations | grep "password:" |
| 47 | + ``` |
| 48 | + |
| 49 | +**That's it!** 🎉 |
| 50 | +
|
| 51 | +--- |
| 52 | +
|
| 53 | +## Optional: Customization |
| 54 | +
|
| 55 | +### Add Custom Settings |
| 56 | +
|
| 57 | +```bash |
| 58 | +# 1. Create custom directory |
| 59 | +mkdir -p custom/static/{images,css} |
| 60 | +
|
| 61 | +# 2. Download example template |
| 62 | +wget -O custom/local_settings.py.example \ |
| 63 | + https://raw.githubusercontent.com/mediacms-io/mediacms/v7.3/custom/local_settings.py.example |
| 64 | +
|
| 65 | +# 3. Copy and edit |
| 66 | +cp custom/local_settings.py.example custom/local_settings.py |
| 67 | +nano custom/local_settings.py |
| 68 | +``` |
| 69 | +
|
| 70 | +Example customizations: |
| 71 | +```python |
| 72 | +# custom/local_settings.py |
| 73 | +DEBUG = False |
| 74 | +ALLOWED_HOSTS = ['media.example.com'] |
| 75 | +PORTAL_NAME = "My Media Portal" |
| 76 | +``` |
| 77 | +
|
| 78 | +### Add Custom Logo |
| 79 | +
|
| 80 | +```bash |
| 81 | +# 1. Copy your logo |
| 82 | +cp ~/my-logo.png custom/static/images/logo_dark.png |
| 83 | +
|
| 84 | +# 2. Reference in settings |
| 85 | +cat >> custom/local_settings.py <<EOF |
| 86 | +PORTAL_LOGO_DARK_PNG = "/custom/static/images/logo_dark.png" |
| 87 | +EOF |
| 88 | +
|
| 89 | +# 3. Restart (no rebuild needed!) |
| 90 | +docker compose restart web |
| 91 | +``` |
| 92 | +
|
| 93 | +### Add Custom CSS |
| 94 | +
|
| 95 | +```bash |
| 96 | +# 1. Create CSS file |
| 97 | +cat > custom/static/css/custom.css <<EOF |
| 98 | +body { |
| 99 | + font-family: 'Arial', sans-serif; |
| 100 | +} |
| 101 | +EOF |
| 102 | +
|
| 103 | +# 2. Reference in settings |
| 104 | +cat >> custom/local_settings.py <<EOF |
| 105 | +EXTRA_CSS_PATHS = ["/custom/static/css/custom.css"] |
| 106 | +EOF |
| 107 | +
|
| 108 | +# 3. Restart (no rebuild needed!) |
| 109 | +docker compose restart web |
| 110 | +``` |
| 111 | +
|
| 112 | +**Note**: Both settings AND static files only need restart - nginx serves custom/ files directly! |
| 113 | +
|
| 114 | +--- |
| 115 | +
|
| 116 | +## HTTPS with Let's Encrypt |
| 117 | + |
| 118 | +### 1. Download cert overlay |
| 119 | + |
| 120 | +```bash |
| 121 | +wget https://raw.githubusercontent.com/mediacms-io/mediacms/v7.3/docker-compose-cert.yaml |
| 122 | +``` |
| 123 | + |
| 124 | +### 2. Edit domains |
| 125 | + |
| 126 | +```bash |
| 127 | +nano docker-compose-cert.yaml |
| 128 | +``` |
| 129 | + |
| 130 | +Change these lines: |
| 131 | +```yaml |
| 132 | +VIRTUAL_HOST: 'media.example.com' # Your domain |
| 133 | +LETSENCRYPT_HOST: 'media.example.com' # Your domain |
| 134 | +LETSENCRYPT_EMAIL: 'admin@example.com' # Your email |
| 135 | +``` |
| 136 | + |
| 137 | +### 3. Start with SSL |
| 138 | + |
| 139 | +```bash |
| 140 | +docker compose -f docker-compose.yaml -f docker-compose-cert.yaml up -d |
| 141 | +``` |
| 142 | + |
| 143 | +**SSL certificates are issued automatically!** |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## File Structure |
| 148 | + |
| 149 | +Your deployment directory: |
| 150 | + |
| 151 | +``` |
| 152 | +mediacms/ |
| 153 | +├── docker-compose.yaml # Required |
| 154 | +├── docker-compose-cert.yaml # Optional (for HTTPS) |
| 155 | +└── custom/ # Optional (for customizations) |
| 156 | + ├── local_settings.py # Django settings |
| 157 | + └── static/ |
| 158 | + ├── images/ # Custom logos |
| 159 | + └── css/ # Custom CSS |
| 160 | +``` |
| 161 | +
|
| 162 | +**Named volumes** (managed by Docker): |
| 163 | +- `mediacms_postgres_data` - Database |
| 164 | +- `mediacms_media_files` - Uploaded media |
| 165 | +- `mediacms_static_files` - Static assets |
| 166 | +- `mediacms_logs` - Application logs |
| 167 | +
|
| 168 | +--- |
| 169 | +
|
| 170 | +## Common Commands |
| 171 | +
|
| 172 | +### View logs |
| 173 | +```bash |
| 174 | +docker compose logs -f web |
| 175 | +docker compose logs -f celery_long |
| 176 | +``` |
| 177 | + |
| 178 | +### Access Django shell |
| 179 | +```bash |
| 180 | +docker compose exec web python manage.py shell |
| 181 | +``` |
| 182 | + |
| 183 | +### Create admin user |
| 184 | +```bash |
| 185 | +docker compose exec web python manage.py createsuperuser |
| 186 | +``` |
| 187 | + |
| 188 | +### Restart service |
| 189 | +```bash |
| 190 | +docker compose restart web |
| 191 | +``` |
| 192 | + |
| 193 | +### Stop everything |
| 194 | +```bash |
| 195 | +docker compose down |
| 196 | +``` |
| 197 | + |
| 198 | +### Update to newer version |
| 199 | +```bash |
| 200 | +docker compose pull |
| 201 | +docker compose up -d |
| 202 | +``` |
| 203 | + |
| 204 | +--- |
| 205 | + |
| 206 | +## Backup |
| 207 | + |
| 208 | +### Database backup |
| 209 | +```bash |
| 210 | +docker compose exec db pg_dump -U mediacms mediacms > backup_$(date +%Y%m%d).sql |
| 211 | +``` |
| 212 | + |
| 213 | +### Media files backup |
| 214 | +```bash |
| 215 | +docker run --rm \ |
| 216 | + -v mediacms_media_files:/data:ro \ |
| 217 | + -v $(pwd):/backup \ |
| 218 | + alpine tar czf /backup/media_backup_$(date +%Y%m%d).tar.gz -C /data . |
| 219 | +``` |
| 220 | + |
| 221 | +--- |
| 222 | + |
| 223 | +## Upgrading from 7.x? |
| 224 | + |
| 225 | +If you're upgrading from an older MediaCMS version, see: |
| 226 | +- **[UPGRADE_TO_7.3.md](./UPGRADE_TO_7.3.md)** - Complete migration guide |
| 227 | +- **[DOCKER_RESTRUCTURE_SUMMARY.md](./DOCKER_RESTRUCTURE_SUMMARY.md)** - What changed |
| 228 | + |
| 229 | +--- |
| 230 | + |
| 231 | +## Documentation |
| 232 | + |
| 233 | +- **Customization**: Download [`custom/README.md`](https://raw.githubusercontent.com/mediacms-io/mediacms/v7.3/custom/README.md) |
| 234 | +- **Upgrade Guide**: [UPGRADE_TO_7.3.md](./UPGRADE_TO_7.3.md) |
| 235 | +- **Architecture**: [DOCKER_RESTRUCTURE_SUMMARY.md](./DOCKER_RESTRUCTURE_SUMMARY.md) |
| 236 | +- **Project Docs**: https://docs.mediacms.io |
| 237 | + |
| 238 | +--- |
| 239 | + |
| 240 | +## Troubleshooting |
| 241 | + |
| 242 | +### Can't access the site? |
| 243 | + |
| 244 | +Check services are running: |
| 245 | +```bash |
| 246 | +docker compose ps |
| 247 | +``` |
| 248 | + |
| 249 | +All services should be "Up" or "Exited (0)" for migrations. |
| 250 | + |
| 251 | +### Forgot admin password? |
| 252 | + |
| 253 | +Check logs: |
| 254 | +```bash |
| 255 | +docker compose logs migrations | grep "password:" |
| 256 | +``` |
| 257 | + |
| 258 | +Or create new admin: |
| 259 | +```bash |
| 260 | +docker compose exec web python manage.py createsuperuser |
| 261 | +``` |
| 262 | + |
| 263 | +### Videos not encoding? |
| 264 | + |
| 265 | +Check celery workers: |
| 266 | +```bash |
| 267 | +docker compose logs celery_long |
| 268 | +docker compose logs celery_short |
| 269 | +``` |
| 270 | + |
| 271 | +### Port 80 already in use? |
| 272 | + |
| 273 | +Edit docker-compose.yaml to use different port: |
| 274 | +```yaml |
| 275 | +nginx: |
| 276 | + ports: |
| 277 | + - "8080:80" # Use port 8080 instead |
| 278 | +``` |
| 279 | +
|
| 280 | +Then access at http://localhost:8080 |
| 281 | +
|
| 282 | +--- |
| 283 | +
|
| 284 | +## Support |
| 285 | +
|
| 286 | +- **Issues**: https://github.com/mediacms-io/mediacms/issues |
| 287 | +- **Discussions**: https://github.com/mediacms-io/mediacms/discussions |
| 288 | +- **Docs**: https://docs.mediacms.io |
| 289 | +
|
| 290 | +--- |
| 291 | +
|
| 292 | +**🎉 Enjoy MediaCMS!** |
0 commit comments