# Lấy Python 3.11 slim (ít file, nhẹ)
FROM python:3.11-slim

# Thư mục làm việc
WORKDIR /app

ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1

# Copy requirements rồi cài package
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy code
COPY . .

# Copy entrypoint script (nếu có)
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

# Mở port 5003
EXPOSE 5003

# Chạy server
CMD ["/app/entrypoint.sh"]