update: add lang and various other improvements

This commit is contained in:
Tobias
2026-09-17 14:48:13 +02:00
parent 1e3e929f9f
commit 1139420ea7
2 changed files with 25 additions and 3 deletions

View File

@@ -32,7 +32,18 @@ function update_script() {
exit
fi
ensure_dependencies libjpeg-dev
ensure_dependencies libjpeg-dev poppler-utils file locales
msg_info "Generating Locales"
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
pl_PL pt_BR ru_RU tr_TR uk_UA zh_CN zh_TW; do
sed -i "s/^# *${l}.UTF-8 UTF-8/${l}.UTF-8 UTF-8/" /etc/locale.gen
done
$STD locale-gen
if ! grep -q "^LC_ALL=" /opt/changedetection/.env 2>/dev/null; then
echo "LC_ALL=en_US.UTF-8" >>/opt/changedetection/.env
fi
msg_ok "Generated Locales"
NODE_VERSION="24" setup_nodejs
@@ -69,7 +80,6 @@ function update_script() {
$STD git -C /opt/browserless/ reset --hard origin/main
$STD npm update --prefix /opt/browserless
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome

View File

@@ -38,9 +38,20 @@ $STD apt-get install -y \
qpdf \
xdg-utils \
xvfb \
ca-certificates
ca-certificates \
locales \
poppler-utils \
file
msg_ok "Installed Dependencies"
msg_info "Generating Locales"
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
pl_PL pt_BR ru_RU tr_TR uk_UA zh_CN zh_TW; do
sed -i "s/^# *${l}.UTF-8 UTF-8/${l}.UTF-8 UTF-8/" /etc/locale.gen
done
$STD locale-gen
msg_ok "Generated Locales"
PYTHON_VERSION="3.13" setup_uv
NODE_VERSION="24" setup_nodejs
@@ -54,6 +65,7 @@ $STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
cat <<EOF >/opt/changedetection/.env
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
LC_ALL=en_US.UTF-8
EOF
msg_ok "Installed Change Detection"