feat(music-render): Dockerfile + requirements + env.example (SP-5)
Windows WSL2 Docker 컨테이너 스캐폴드. Plan-B-Insta보다 가벼움 — Chromium 미포함, requests + httpx + redis + mutagen만. .env.example에 SUNO_API_KEY 자리 (NAS에서 옮겨올 값). Plan-B-Music Phase 2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
services/music-render/.env.example
Normal file
20
services/music-render/.env.example
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Plan-B-Music — Windows music-render worker
|
||||||
|
|
||||||
|
# NAS Redis 큐
|
||||||
|
REDIS_URL=redis://192.168.45.54:6379
|
||||||
|
|
||||||
|
# NAS internal webhook
|
||||||
|
NAS_BASE_URL=http://192.168.45.54:18600
|
||||||
|
INTERNAL_API_KEY=__copy_from_nas_dotenv__
|
||||||
|
|
||||||
|
# Suno API (sunoapi.org 래퍼) — NAS .env에서 옮겨옴
|
||||||
|
SUNO_API_KEY=__paste_suno_key_here__
|
||||||
|
|
||||||
|
# MusicGen 호스트 (Windows native Python — 박재오 PC localhost)
|
||||||
|
MUSIC_AI_SERVER_URL=http://host.docker.internal:8765
|
||||||
|
|
||||||
|
# NAS SMB mount 안의 음악 디렉토리
|
||||||
|
MUSIC_MEDIA_ROOT=/mnt/nas/webpage/data/music
|
||||||
|
|
||||||
|
# nginx 서빙 prefix (NAS webhook payload용)
|
||||||
|
MUSIC_MEDIA_URL_PREFIX=/media/music
|
||||||
17
services/music-render/Dockerfile
Normal file
17
services/music-render/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM python:3.12-slim-bookworm
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# requests SSL 의존성만 필요 (Chromium 불필요)
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir --timeout 600 --retries 5 -r requirements.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|
||||||
9
services/music-render/requirements.txt
Normal file
9
services/music-render/requirements.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
fastapi==0.115.6
|
||||||
|
uvicorn[standard]==0.34.0
|
||||||
|
requests==2.32.3
|
||||||
|
redis>=5.0
|
||||||
|
httpx>=0.27
|
||||||
|
mutagen==1.47.0
|
||||||
|
pytest>=8.0
|
||||||
|
pytest-asyncio>=0.24
|
||||||
|
respx>=0.21
|
||||||
Reference in New Issue
Block a user