chore: FFmpeg 설치 + Nginx /media/videos/ + docker-compose volumes + 환경변수
This commit is contained in:
@@ -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=
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user