# 1. Cache bust argument to force fresh clone ARG CACHEBUST=1 # 2. Base image FROM python:3.10-slim # 3. Install git for cloning RUN apt-get update && \ apt-get install -y --no-install-recommends git && \ rm -rf /var/lib/apt/lists/* # 4. Set working directory WORKDIR /app # 5. Accept GitHub token and cache-bust ARG GITHUB_TOKEN ENV GITHUB_TOKEN=${GITHUB_TOKEN} # Bust cache and echo RUN echo "Cache bust #${CACHEBUST}" # 6. Clone your private repo RUN git clone --depth=1 https://${GITHUB_TOKEN}@github.com/HaxWitcher/m3u-proxy-backend.git . # 7. Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # 8. Start FastAPI CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]