-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 786 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 786 Bytes
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
# Dockerfile para Steam Bundle Scraper
# Otimizado para Orange Pi (ARM64) com SQLite
FROM python:3.11-slim
# Configurações
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
# Instala apenas cron (não precisa de Playwright mais!)
RUN apt-get update && apt-get install -y \
cron \
&& rm -rf /var/lib/apt/lists/*
# Copia e instala dependências Python
COPY scraper/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copia código
COPY scraper/ ./scraper/
COPY smart_scraper.py .
# Cria diretório para dados
RUN mkdir -p /app/data
# Comando padrão: cron rodando smart_scraper.py 1x por dia
CMD ["sh", "-c", "echo '0 3 * * * cd /app && python smart_scraper.py --mode auto >> /app/data/cron.log 2>&1' | crontab - && crond -f -l 2"]