| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| FROM node:22-slim |
|
|
| |
| LABEL maintainer="user" |
| LABEL description="Microsoft Rewards Script - Hugging Face Space" |
|
|
| |
| ENV DEBIAN_FRONTEND=noninteractive \ |
| PLAYWRIGHT_BROWSERS_PATH=0 \ |
| NODE_ENV=production \ |
| TZ=Europe/Paris \ |
| FORCE_HEADLESS=1 \ |
| PYTHONUNBUFFERED=1 |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| python3 \ |
| python3-pip \ |
| python3-venv \ |
| git \ |
| cron \ |
| gettext-base \ |
| tzdata \ |
| ca-certificates \ |
| curl \ |
| libglib2.0-0 \ |
| libdbus-1-3 \ |
| libexpat1 \ |
| libfontconfig1 \ |
| libgtk-3-0 \ |
| libnspr4 \ |
| libnss3 \ |
| libasound2 \ |
| libflac12 \ |
| libatk1.0-0 \ |
| libatspi2.0-0 \ |
| libdrm2 \ |
| libgbm1 \ |
| libdav1d6 \ |
| libx11-6 \ |
| libx11-xcb1 \ |
| libxcomposite1 \ |
| libxcursor1 \ |
| libxdamage1 \ |
| libxext6 \ |
| libxfixes3 \ |
| libxi6 \ |
| libxrandr2 \ |
| libxrender1 \ |
| libxss1 \ |
| libxtst6 \ |
| libdouble-conversion3 \ |
| && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* |
|
|
| |
| WORKDIR /usr/src/microsoft-rewards-script |
|
|
| |
| RUN git clone https://github.com/TheNetsky/Microsoft-Rewards-Script.git /usr/src/microsoft-rewards-script |
| |
| |
| RUN npm ci --ignore-scripts \ |
| && npm run build \ |
| && rm -rf node_modules \ |
| && npm ci --omit=dev --ignore-scripts \ |
| && npm cache clean --force |
| |
| |
| RUN npx playwright install --with-deps --only-shell chromium \ |
| && rm -rf /root/.cache /tmp/* /var/tmp/* |
| |
| |
| RUN sed -i 's/"headless": false/"headless": true/' /usr/src/microsoft-rewards-script/src/config.json || true |
| |
| |
| RUN mkdir -p /usr/src/microsoft-rewards-script/dist/sessions |
| |
| |
| WORKDIR /app |
| |
| |
| RUN pip3 install --no-cache-dir --break-system-packages \ |
| gradio \ |
| apscheduler |
| |
| |
| COPY app.py /app/app.py |
| |
| |
| EXPOSE 7860 |
| |
| |
| RUN useradd -m -u 1000 appuser \ |
| && chown -R appuser:appuser /app \ |
| && chown -R appuser:appuser /usr/src/microsoft-rewards-script |
| |
| USER appuser |
| |
| |
| CMD ["python3", "/app/app.py"] |
| |