| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # ==========================================================
- # Cloud Upload v1 — nginx & cron configuration
- # ==========================================================
- # ---- nginx: increase max body size ----
- # Add to the server block for music.chad-partners.com:
- server {
- # ... existing config ...
- # Allow uploads up to 200 MB (default is 1 MB)
- client_max_body_size 200m;
- # ... existing proxy_pass etc ...
- }
- # Alternatively, scope it to just the upload endpoint:
- #
- # location /api/upload {
- # client_max_body_size 200m;
- # proxy_pass http://127.0.0.1:5000;
- # # nginx buffers request body to disk by default
- # # (proxy_request_buffering on) — safe for large files
- # }
- # ---- cron: beets import + rescan ----
- # Add to crontab for user 'uploader' (or whoever runs beets):
- # crontab -e -u uploader
- */5 * * * * /home/uploader/.local/bin/beet import --move --quiet /data/upload/mixboard/ 2>/dev/null && curl -sX POST http://localhost:5000/api/rescan >/dev/null 2>&1
- # What this does:
- # 1. Every 5 minutes, beets imports files from the upload directory
- # 2. --move: moves files to organized library (Artist/Album/Track.ext)
- # 3. --quiet: no interactive prompts, skip unrecognized files
- # 4. After import, triggers rescan so library reflects the moves
- # 5. Recognized files get MusicBrainz metadata + cover art
- # 6. Unrecognized files stay in upload dir, still playable via original tags
- # ---- Upload directory setup ----
- # Run once on the server:
- # mkdir -p /data/upload/mixboard
- # chown uploader:uploader /data/upload/mixboard
- # chmod 755 /data/upload/mixboard
|