Spaces:
Runtime error
Runtime error
| # Base image Python + Debian stabil | |
| FROM python:3.12-bullseye | |
| # Environment variables | |
| ENV TZ=Asia/Jakarta \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| CHROME_BIN=/usr/bin/chromium | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| chromium \ | |
| chromium-driver \ | |
| ffmpeg \ | |
| imagemagick \ | |
| git \ | |
| curl \ | |
| wget \ | |
| gnupg \ | |
| libnss3-dev \ | |
| libasound2 \ | |
| libatk1.0-0 \ | |
| libc6 \ | |
| libcairo2 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libexpat1 \ | |
| libfontconfig1 \ | |
| libgcc1 \ | |
| libglib2.0-0 \ | |
| libgtk-3-0 \ | |
| libnspr4 \ | |
| libpango-1.0-0 \ | |
| libpangocairo-1.0-0 \ | |
| libstdc++6 \ | |
| libx11-6 \ | |
| libx11-xcb1 \ | |
| libxcb1 \ | |
| libxcomposite1 \ | |
| libxcursor1 \ | |
| libxdamage1 \ | |
| libxext6 \ | |
| libxfixes3 \ | |
| libxi6 \ | |
| libxrandr2 \ | |
| libxrender1 \ | |
| libxss1 \ | |
| libxtst6 \ | |
| ca-certificates \ | |
| libayatana-appindicator1 \ | |
| lsb-release \ | |
| xdg-utils \ | |
| fonts-liberation \ | |
| fonts-dejavu \ | |
| fonts-noto-color-emoji \ | |
| build-essential \ | |
| libcairo2-dev \ | |
| libpango1.0-dev \ | |
| libjpeg-dev \ | |
| libgif-dev \ | |
| librsvg2-dev \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Node.js (untuk Playwright) | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && npm install -g playwright | |
| # Install Playwright dependencies Linux | |
| RUN playwright install-deps | |
| RUN playwright install chromium | |
| # Clone repository | |
| RUN git clone https://github.com/Theyka/Turnstile-Solver.git /app | |
| # Copy file lokal (menimpa repo jika ada) | |
| COPY . /app | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # Expose port jika aplikasi memakai port tertentu | |
| EXPOSE 7860 | |
| # Jalankan aplikasi | |
| CMD ["python3", "main.py"] |