FROM python:3.12-slim

WORKDIR /app

RUN apt-get update && \
    apt-get install -y --no-install-recommends tzdata && \
    rm -rf /var/lib/apt/lists/*
ENV TZ=Asia/Seoul

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py assign_teams.py entrypoint.sh ./
RUN chmod +x /app/entrypoint.sh

EXPOSE 8501

ENV DATA_PATH=/app/data/hackathon.json

ENTRYPOINT ["/app/entrypoint.sh"]
