- Add newenglandoil/ package as the primary scraper (replaces fuel_scraper) - Add cheapestoil/ package as a secondary market price scraper - Add app.py entry point for direct execution - Update run.py: new scrape_cheapest(), migrate command, --state filter, --refresh-metadata flag for overwriting existing phone/URL data - Update models.py with latest schema fields - Update requirements.txt dependencies - Update Dockerfile and docker-compose.yml for new structure - Remove deprecated fuel_scraper module, test.py, and log file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
858 B
Docker
31 lines
858 B
Docker
# Use an official Python runtime as a parent image
|
|
FROM python:3.11-slim-bookworm
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies that might be needed by psycopg2 or other libraries
|
|
# libpq-dev is for PostgreSQL client libraries
|
|
RUN apt-get update && apt-get install -y \
|
|
libpq-dev \
|
|
gcc \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the requirements file into the container
|
|
COPY requirements.txt .
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the rest of the application code into the container
|
|
# This will be overridden by the volume mount in docker-compose for development
|
|
COPY . .
|
|
|
|
EXPOSE 9553
|
|
|
|
CMD ["python3", "run.py", "server"]
|