FROM python:3.11-slim

WORKDIR /app

# 安装 nodejs（用于 process_data.js）
RUN apt-get update && apt-get install -y --no-install-recommends \
    nodejs npm \
    && rm -rf /var/lib/apt/lists/*

# Python 依赖
RUN pip install --no-cache-dir plotly

# 复制项目文件
COPY . /app

EXPOSE 8080

# 启动接收服务
CMD ["python", "receive_file.py"]
