This commit is contained in:
2025-11-14 12:51:18 +01:00
parent 433a16ee0e
commit 869ca3a894
20 changed files with 1606 additions and 38 deletions

View File

@@ -0,0 +1,30 @@
FROM python:3.11-slim
WORKDIR /app
# Install Chromium and dependencies for Selenium (works on both ARM64 and AMD64)
RUN apt-get update && apt-get install -y \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/*
# Set environment variable for Chromium
ENV CHROME_BIN=/usr/bin/chromium
ENV CHROMEDRIVER_PATH=/usr/bin/chromedriver
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy crawler files
COPY *.py /app/
COPY *.sh /app/
# Make start script executable
RUN chmod +x /app/start.sh
# Expose port for API
EXPOSE 5002
# Run both API and worker
CMD ["/app/start.sh"]