chore: FFmpeg 설치 + Nginx /media/videos/ + docker-compose volumes + 환경변수

This commit is contained in:
2026-05-01 12:03:19 +09:00
parent 327d0b4e81
commit a7b2fc0d9d
4 changed files with 18 additions and 0 deletions

View File

@@ -88,3 +88,7 @@ AGENT_OFFICE_URL=http://agent-office:8000
REALESTATE_LAB_URL=http://realestate-lab:8000 REALESTATE_LAB_URL=http://realestate-lab:8000
REALESTATE_DASHBOARD_URL=http://localhost:8080/realestate REALESTATE_DASHBOARD_URL=http://localhost:8080/realestate
REALESTATE_NOTIFY_TIMEOUT=15 REALESTATE_NOTIFY_TIMEOUT=15
# [MUSIC LAB — YouTube Video Generation]
PEXELS_API_KEY=
YOUTUBE_DATA_API_KEY=

View File

@@ -66,6 +66,7 @@ services:
- CORS_ALLOW_ORIGINS=${CORS_ALLOW_ORIGINS:-http://localhost:3007,http://localhost:8080} - CORS_ALLOW_ORIGINS=${CORS_ALLOW_ORIGINS:-http://localhost:3007,http://localhost:8080}
volumes: volumes:
- ${RUNTIME_PATH}/data/music:/app/data - ${RUNTIME_PATH}/data/music:/app/data
- ${RUNTIME_PATH:-.}/data/videos:/app/data/videos
healthcheck: healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s interval: 30s

View File

@@ -1,6 +1,8 @@
FROM python:3.12-alpine FROM python:3.12-alpine
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache ffmpeg
WORKDIR /app WORKDIR /app
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt

View File

@@ -33,6 +33,17 @@ server {
autoindex off; 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로 전체 경로 전달 # music API — 변수 기반 proxy_pass + $request_uri로 전체 경로 전달
location /api/music/ { location /api/music/ {
resolver 127.0.0.11 valid=10s; resolver 127.0.0.11 valid=10s;