d3ro-voice/docker-compose.nas.yml
Yun Chan e87ce63440 docs: record Wave 3 surface consolidation and fold NAS-only whisper into compose
- docs/REFACTOR_WAVE3_REPORT.md and the Wave 3 policy: canonical map,
  production changes, verification and remaining external steps.
- Gap backlog: GAP-BILL-01 resolved; new GAP-BILL-02 (Payple renewal never ran,
  Payple client key never set), GAP-WEB-01 (tunnel host for /app), GAP-OPS-01
  (NAS compose/.env drift), GAP-CI-01, GAP-I18N-02, GAP-TEAM-02.
- design.md: hero loop decision (numbers taken from the app capsule), pricing
  mismatch closed; feature catalog SHELL-11 updated.
- docs/map, release guide and mobile release docs no longer describe the
  deleted wwwroot, binaries, Dockerfile.admin, NAS site copy or .github CI.
- docker-compose.nas.yml gains the d3ro-whisper service that only existed in
  the NAS copy, so the repository file is the complete definition.
- refactor-wave skill: Wave 3 index and lessons P10-P12.
2026-09-26 16:02:44 +09:00

100 lines
3.8 KiB
YAML

# ============================================================================
# D3RO Voice — Standalone NAS Docker Compose Specification
# Includes: Core API + Next.js Admin CRM + Web App (/app)
# 랜딩·법률 문서는 site/(Cloudflare Pages)가 정본이다. 여기서 서빙하지 않는다.
# ============================================================================
services:
d3ro-api-server:
image: d3ro-voice-api:latest
container_name: d3ro_voice_api
restart: unless-stopped
ports:
- "${PORT:-5050}:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:5000
- DATA_DIR=/app/data
- JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required}
- JWT_ISSUER=${JWT_ISSUER:?JWT_ISSUER is required}
- JWT_AUDIENCE=${JWT_AUDIENCE:?JWT_AUDIENCE is required}
- ADMIN_BOOTSTRAP_TOKEN=${ADMIN_BOOTSTRAP_TOKEN:?ADMIN_BOOTSTRAP_TOKEN is required}
- D3RO_API_TOKEN=${D3RO_API_TOKEN:?D3RO_API_TOKEN is required}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:?CORS_ALLOWED_ORIGINS is required}
- ALLOWED_HOSTS=${ALLOWED_HOSTS:?ALLOWED_HOSTS is required}
- TZ=${TZ:-Asia/Seoul}
volumes:
- ${DATA_PATH:-./data}:/app/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
d3ro-admin:
image: d3ro-voice-admin:latest
container_name: d3ro_voice_admin
restart: unless-stopped
ports:
- "${ADMIN_PORT:-3001}:3001"
environment:
- NODE_ENV=production
- PORT=3001
- API_SERVER_URL=${API_SERVER_URL:?API_SERVER_URL is required}
- ADMIN_SESSION_SECRET=${ADMIN_SESSION_SECRET:?ADMIN_SESSION_SECRET is required}
- ADMIN_COOKIE_SECURE=${ADMIN_COOKIE_SECURE:-true}
- SUPABASE_URL=${SUPABASE_URL:?SUPABASE_URL is required}
- SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY:?SUPABASE_SERVICE_ROLE_KEY is required}
depends_on:
- d3ro-api-server
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ============================================================================
# D3RO Voice — Web App (@d3ro/web), 공개 경로 https://d3ro.chanpaca.net/app
# 사이트 브리지 워커가 /app/* 를 Cloudflare Tunnel 을 거쳐 이 컨테이너로 보낸다.
# ============================================================================
d3ro-web:
image: d3ro-voice-web:latest
container_name: d3ro_voice_web
restart: unless-stopped
ports:
- "${WEB_PORT:-3002}:3002"
# NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY / NEXT_PUBLIC_PAYPLE_CLIENT_KEY 는
# 이미지 빌드 때 번들에 들어간다(build args). 런타임에 넣어도 바뀌지 않으므로 여기 두지 않는다.
environment:
- NODE_ENV=production
- PORT=3002
- TZ=${TZ:-Asia/Seoul}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ============================================================================
# 로컬 Whisper STT 서버 (faster-whisper, OpenAI 호환) — NAS 운영본에만 있던 서비스를 정본으로 합쳤다.
# large-v3/large-v3-turbo/small 모델은 캐시 볼륨에 저장된다.
# int8 양자화 + 2스레드 — J4025 2코어 기준 5초 오디오: small≈38s.
# ============================================================================
d3ro-whisper:
image: ghcr.io/speaches-ai/speaches:latest-cpu
container_name: d3ro_whisper
restart: unless-stopped
mem_limit: 5g
environment:
- WHISPER__COMPUTE_TYPE=int8
- WHISPER__CPU_THREADS=2
- TZ=${TZ:-Asia/Seoul}
volumes:
- whisper-cache:/home/ubuntu/.cache/huggingface
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
whisper-cache: