Spaces:
Sleeping
Sleeping
| # SpotiFLAC Space — API + Telegram bot (FLAC lossless via zarz grant) | |
| FROM python:3.12-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| CHROME_BIN=/usr/bin/chromium \ | |
| CHROME_PATH=/usr/bin/chromium | |
| # system deps: chromium (turnstile solver), xvfb (real-browser), ffmpeg, node | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| chromium chromium-driver xvfb ffmpeg curl procps \ | |
| nodejs npm \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /srv | |
| # python deps | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # cf-clearance-scraper (turnstile token solver, real Chrome via Xvfb) | |
| COPY cf-solver/package.json cf-solver/package-lock.json ./cf-solver/ | |
| RUN cd cf-solver && npm clean-install --no-audit --no-fund | |
| COPY cf-solver/src ./cf-solver/src | |
| # app: grant-adapter + api + bot | |
| COPY grant-adapter.js bot.py spot_run.py api.py entrypoint.sh ./ | |
| RUN npm install axios bycf | |
| RUN chmod +x entrypoint.sh | |
| ENV TURNSTILE_SOLVER_URL=http://127.0.0.1:9400 | |
| EXPOSE 7860 | |
| CMD ["./entrypoint.sh"] |