crawling-datas / Dockerfile
dimdimm's picture
feat: tambah UI 1-klik Flask + deploy Render (limit 2 keyword, 13 keyword IT+non-IT)
3e7a192
Raw History Blame Contribute Delete
576 Bytes
# Render: Python + Playwright Chromium siap pakai
FROM mcr.microsoft.com/playwright/python:v1.62.0-jammy
WORKDIR /app
# deps Python dulu (cache layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# browser sudah ada di base image, pastikan chromium terpasang
RUN playwright install chromium
COPY . .
# Render Free: 0.1 CPU / 512MB → 1 worker saja (hemat RAM), timeout 300s karena scraping lama
# Spin down = cold start 30-60s, normal untuk free tier
CMD gunicorn --bind 0.0.0.0:${PORT:-10000} --workers 1 --threads 2 --timeout 300 app:app