File size: 804 Bytes
c481f8a 8336f26 c481f8a 26f14ba c481f8a | 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 30 31 32 33 34 35 | FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
&& playwright install chromium \
&& playwright install-deps chromium
COPY package.json .
RUN npm install
COPY . .
# Build frontend
RUN cd frontend && npm install && npm run build
ENV PYTHONPATH=/app
ENV MEDIACRAWLER_STORAGE_STATE_PATHS=/app/storage/state.json
ENV PYTHONUNBUFFERED=1
EXPOSE 7860
CMD ["uvicorn", "service.app:app", "--host", "0.0.0.0", "--port", "7860"]
|