Record worker browser sessions

This commit is contained in:
2026-08-02 23:23:23 +03:30
parent 601b8ec69e
commit 66c8c19e0c
11 changed files with 384 additions and 14 deletions
+4 -7
View File
@@ -1,8 +1,8 @@
# ── Stage 1: dependency resolver ─────────────────────────────────────────────
FROM python:3.11-slim AS builder
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Keep the build independent of GHCR; dependencies already use official PyPI.
RUN pip install --no-cache-dir uv==0.11.31
WORKDIR /app
@@ -17,12 +17,9 @@ FROM python:3.11-slim AS runtime
# ── Chromium + matching system ChromeDriver ───────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl chromium chromium-driver \
ca-certificates curl chromium chromium-driver ffmpeg xvfb \
&& rm -rf /var/lib/apt/lists/*
# ── uv + venv from builder ────────────────────────────────────────────────────
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
WORKDIR /app
# Make the venv's binaries the default Python
@@ -43,7 +40,7 @@ COPY --from=builder /app/.venv /app/.venv
# Patch Debian's version-matched driver at build time. Runtime jobs require no
# ChromeDriver network download.
RUN PYTHONPATH=. python scripts/patch_driver.py && mkdir -p data logs
RUN PYTHONPATH=. python scripts/patch_driver.py && mkdir -p data logs recordings
# Non-root user for safety
RUN useradd -m -u 1001 seed && chown -R seed:seed /app