fixed byuild
All checks were successful
CI / release (push) Successful in 1m59s

This commit is contained in:
estebanthi
2026-01-18 14:25:52 +01:00
parent 2b65730d77
commit 34822965d2
2 changed files with 45 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
FROM node:20.12.2-slim
ENV NODE_ENV=production
ENV CHROME_PATH=/usr/bin/google-chrome
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
ENV CHROME_PATH=/usr/bin/google-chrome-stable
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable
# Install Chrome and dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \

View File

@@ -1,4 +1,47 @@
#!/bin/sh
set -eu
resolve_chrome_path() {
if [ -n "${CHROME_PATH:-}" ] && [ -x "$CHROME_PATH" ]; then
return 0
fi
for candidate in \
/usr/bin/google-chrome-stable \
/usr/bin/google-chrome \
/opt/google/chrome/google-chrome \
/usr/bin/chromium \
/usr/bin/chromium-browser; do
if [ -x "$candidate" ]; then
CHROME_PATH="$candidate"
return 0
fi
done
if command -v google-chrome-stable >/dev/null 2>&1; then
CHROME_PATH="$(command -v google-chrome-stable)"
return 0
fi
if command -v google-chrome >/dev/null 2>&1; then
CHROME_PATH="$(command -v google-chrome)"
return 0
fi
if command -v chromium >/dev/null 2>&1; then
CHROME_PATH="$(command -v chromium)"
return 0
fi
if command -v chromium-browser >/dev/null 2>&1; then
CHROME_PATH="$(command -v chromium-browser)"
return 0
fi
echo "No Chrome/Chromium executable found. Set CHROME_PATH to a valid binary." >&2
exit 1
}
resolve_chrome_path
export CHROME_PATH
export PUPPETEER_EXECUTABLE_PATH="${PUPPETEER_EXECUTABLE_PATH:-$CHROME_PATH}"
rm -f /tmp/.X99-lock
Xvfb :99 -screen 0 1024x768x24 &