# syntax=docker/dockerfile:1 # ADO2 Hookit — 올인원 로컬 이미지 (FastAPI 백엔드 + 정적 프론트 + Remotion 렌더) # · Python 3.12 (server) + Node 22 (Remotion) + ffmpeg + headless Chromium # · dry_run=true 면 Higgsfield 호출 없이 데모 영상 + Remotion 오버레이까지 완주 # · 실제 생성은 Higgsfield CLI 디바이스 인증이 별도로 필요 (HANDOFF.md §7-2) FROM python:3.12-slim-bookworm ENV PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PORT=10001 \ WEBAPP_DIR=/app/webapp \ OUTPUTS_DIR=/app/server/outputs \ UPLOADS_DIR=/app/server/.uploads # 시스템 의존성: ffmpeg(ffprobe) + Node 22 + Remotion headless Chromium 런타임 libs + CJK 폰트 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gnupg ffmpeg \ libnss3 libdbus-1-3 libatk1.0-0 libgbm1 libasound2 \ libxrandr2 libxkbcommon0 libxfixes3 libxcomposite1 libxdamage1 \ libatk-bridge2.0-0 libpango-1.0-0 libcairo2 libcups2 \ fonts-liberation fonts-noto-cjk \ && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ && apt-get install -y --no-install-recommends nodejs \ && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app # --- Python 백엔드 (deps + 패키지) --- COPY server ./server RUN pip install ./server # --- Remotion (Node) deps — 락파일 기반 재현 설치 --- COPY remotion/package.json remotion/package-lock.json ./remotion/ RUN cd remotion && npm ci # --- 나머지 소스 --- COPY remotion ./remotion COPY webapp ./webapp # Remotion이 쓰는 headless 브라우저 미리 다운로드 (런타임 첫 렌더 지연 제거) RUN cd remotion && npx remotion browser ensure EXPOSE 10001 WORKDIR /app/server CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]