From fb8eebb1603555e198a2ebf27b5424bd77324692 Mon Sep 17 00:00:00 2001 From: frarol96 Date: Sat, 16 Aug 2025 06:31:52 +0000 Subject: [PATCH] Update wrapper/docker-entrypoint.sh --- wrapper/docker-entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrapper/docker-entrypoint.sh b/wrapper/docker-entrypoint.sh index 5310439..aa15511 100644 --- a/wrapper/docker-entrypoint.sh +++ b/wrapper/docker-entrypoint.sh @@ -33,9 +33,11 @@ if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt fi -# Cache Playwright browsers in /cache so it persists across restarts +# Cache Playwright browsers in /cache so they persist across restarts export PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-/cache/pw-browsers}" +mkdir -p "$PLAYWRIGHT_BROWSERS_PATH" +# If playwright is available, ensure Chromium is installed if python -c "import playwright" >/dev/null 2>&1; then if [ ! -d "$PLAYWRIGHT_BROWSERS_PATH" ] || [ -z "$(ls -A "$PLAYWRIGHT_BROWSERS_PATH" 2>/dev/null)" ]; then echo "[Wrapper] Installing Playwright Chromium to $PLAYWRIGHT_BROWSERS_PATH ..."