Spaces:
Paused
Paused
File size: 729 Bytes
3c11b6e 4da6cb8 3c11b6e 7f5ad0e 3c11b6e 4da6cb8 3c11b6e 7f5ad0e 4da6cb8 3c11b6e 7f5ad0e 3c11b6e 7f5ad0e 4da6cb8 3c11b6e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # 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"] |