testautomation / Dockerfile
INFINA-RD
refactor: DI infrastructure, service decomposition, repository helpers, test suite
e066621
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app/web-scripter
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
wget \
ca-certificates \
xvfb \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libxkbcommon0 \
libxcomposite1 \
libxrandr2 \
libgbm1 \
libgtk-3-0 \
libpango-1.0-0 \
libasound2 \
fonts-liberation \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
COPY web-scripter/requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN pip install --no-cache-dir playwright && playwright install --with-deps chromium
COPY web-scripter /app/web-scripter
RUN mkdir -p /app/web-scripter/static/images/gif
ENV DISPLAY=:99
ENV PORT=7860
EXPOSE 7860
CMD ["bash", "-lc", "Xvfb :99 -screen 0 1920x1080x24 & alembic upgrade head && uvicorn app:app --host 0.0.0.0 --port ${PORT}"]