diff --git a/.env.example b/.env.example index 9d50030..17ca8a4 100644 --- a/.env.example +++ b/.env.example @@ -88,3 +88,7 @@ AGENT_OFFICE_URL=http://agent-office:8000 REALESTATE_LAB_URL=http://realestate-lab:8000 REALESTATE_DASHBOARD_URL=http://localhost:8080/realestate REALESTATE_NOTIFY_TIMEOUT=15 + +# [MUSIC LAB — YouTube Video Generation] +PEXELS_API_KEY= +YOUTUBE_DATA_API_KEY= diff --git a/docker-compose.yml b/docker-compose.yml index b0ab208..011552b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,7 @@ services: - CORS_ALLOW_ORIGINS=${CORS_ALLOW_ORIGINS:-http://localhost:3007,http://localhost:8080} volumes: - ${RUNTIME_PATH}/data/music:/app/data + - ${RUNTIME_PATH:-.}/data/videos:/app/data/videos healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s diff --git a/music-lab/Dockerfile b/music-lab/Dockerfile index c05ee7c..148df51 100644 --- a/music-lab/Dockerfile +++ b/music-lab/Dockerfile @@ -1,6 +1,8 @@ FROM python:3.12-alpine ENV PYTHONUNBUFFERED=1 +RUN apk add --no-cache ffmpeg + WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt diff --git a/nginx/default.conf b/nginx/default.conf index a3d428d..2ddc6d1 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -33,6 +33,17 @@ server { autoindex off; } + # music videos — Nginx가 직접 비디오 파일 서빙 + location ^~ /media/videos/ { + alias /data/videos/; + + expires 1d; + add_header Cache-Control "public, max-age=86400" always; + add_header Accept-Ranges bytes always; # 비디오 스트리밍 범위 요청 지원 + + autoindex off; + } + # music API — 변수 기반 proxy_pass + $request_uri로 전체 경로 전달 location /api/music/ { resolver 127.0.0.11 valid=10s;