FROM ubuntu:24.04

WORKDIR /app

ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_ENV=production

# 시스템 패키지 설치
RUN apt-get update && apt-get install -y \
    curl \
    wget \
    gnupg \
    lsb-release \
    apt-transport-https \
    ca-certificates \
    git \
    build-essential \
    python3 \
    python3-dev \
    python3-pip \
    ffmpeg \
    chromium-browser \
    && rm -rf /var/lib/apt/lists/*

RUN pip install requests cryptography flask python-dotenv Pillow --break-system-packages

# Node.js 및 npm 설치
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get install -y nodejs && \
    rm -rf /var/lib/apt/lists/*

# 포트 개방
EXPOSE 3000 3001

WORKDIR /app/data
