feat(fotograf-de-scraper): initial setup with backend and frontend scaffold [32788f42]
This commit is contained in:
45
fotograf-de-scraper/backend/Dockerfile
Normal file
45
fotograf-de-scraper/backend/Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.11-slim-buster
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies for Chrome and other tools
|
||||
# Using a multi-stage build or a more specific base image could optimize this
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
chromium-driver \
|
||||
chromium \
|
||||
wget \
|
||||
unzip \
|
||||
fonts-liberation \
|
||||
libappindicator3-1 \
|
||||
libasound2 \
|
||||
libatk-bridge2.0-0 \
|
||||
libcups2 \
|
||||
libdrm-dev \
|
||||
libgbm-dev \
|
||||
libglvnd0 \
|
||||
libgtk-3-0 \
|
||||
libnspr4 \
|
||||
libnss3 \
|
||||
libxkbcommon0 \
|
||||
libxshmfence-dev \
|
||||
xdg-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set Chromium as default browser for Selenium
|
||||
ENV CHROME_BIN /usr/bin/chromium
|
||||
ENV CHROME_PATH /usr/bin/chromium
|
||||
|
||||
# Copy the requirements file and install Python dependencies
|
||||
COPY requirements.txt ./requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the application code
|
||||
COPY . .
|
||||
|
||||
# Expose the port FastAPI will run on
|
||||
EXPOSE 8000
|
||||
|
||||
# Command to run the application
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user