set conditional for chrome / chromium path

This commit is contained in:
David Bomba
2025-03-25 12:04:11 +11:00
parent 4bff59808e
commit ec35498159
2 changed files with 8 additions and 1 deletions

2
debian/.env vendored
View File

@@ -57,6 +57,6 @@ NORDIGEN_SECRET_KEY=
IS_DOCKER=true
SCOUT_DRIVER=null
SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
#SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable

View File

@@ -82,4 +82,11 @@ if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$
fi
fi
# Set PDF generation browser path based on architecture
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
export SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
elif [ "$(dpkg --print-architecture)" = "arm64" ]; then
export SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium
fi
exec "$@"