Auto-upload stems to Gokapi on completion, save share link

- New helpers: parse_stems_urls, upload_to_gokapi, process_stems_to_gokapi
- Stems webhook handler now downloads stem files from MusicGPT CDN,
  zips them, uploads to Gokapi with 30-day expiry, saves the Gokapi
  download URL to stems_link in the DB
- Download Stems button uses stems_link (Gokapi URL) when available,
  falls back to the zip endpoint if not
- Config: GOKAPI_URL, GOKAPI_API_KEY, GOKAPI_EXPIRY_DAYS env vars
- docker-compose: GOKAPI_* environment variables added
This commit is contained in:
Troll (Hermes Agent) 2026-08-11 20:45:28 +00:00
parent 9df4c685a4
commit ccc93ffb3b
5 changed files with 140 additions and 3 deletions

View file

@ -11,7 +11,8 @@
# Required: APP_SECRET_KEY, ADMIN_PASSWORD, SMTP_PASS, PUBLIC_BASE_URL, MUSICGPT_API_KEY
# Optional: BOOTH_NAME, HOST_PORT, INTERNAL_PORT, PRICE_PER_VERSION,
# CURRENCY, MAX_REVISIONS, HERMES_API_KEY, DATABASE, UPLOAD_FOLDER,
# SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_FROM
# SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_FROM,
# GOKAPI_URL, GOKAPI_API_KEY, GOKAPI_EXPIRY_DAYS
#
# Named volumes keep the SQLite database and uploaded/downloaded songs persistent
# across container restarts and redeploys.
@ -40,6 +41,9 @@ services:
- CURRENCY=${CURRENCY:-CAD}
- DATABASE=${DATABASE:-/app/data/booth.db}
- UPLOAD_FOLDER=${UPLOAD_FOLDER:-/app/uploads}
- GOKAPI_URL=${GOKAPI_URL:-}
- GOKAPI_API_KEY=${GOKAPI_API_KEY:-}
- GOKAPI_EXPIRY_DAYS=${GOKAPI_EXPIRY_DAYS:-30}
ports:
- "${HOST_PORT:-0.0.0.0:8500}:${INTERNAL_PORT:-8000}"
volumes: