Add Chromium and Node modules to ArchiveBox scripts (#8725)

This commit is contained in:
CanbiZ
2025-10-29 09:55:11 -07:00
committed by Michel Roegl-Brunner
parent 820a8a984c
commit 03d496ed0c
2 changed files with 19 additions and 12 deletions

View File

@@ -28,12 +28,18 @@ function update_script() {
exit exit
fi fi
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" NODE_MODULE="@postlight/parser@latest,single-file-cli@latest" setup_nodejs
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv
msg_info "Stopping ArchiveBox" if ! dpkg -l | grep -q "^ii chromium "; then
msg_info "Installing System Dependencies"
$STD apt-get install -y chromium
msg_ok "Installed System Dependencies"
fi
msg_info "Stopping Service"
systemctl stop archivebox systemctl stop archivebox
msg_ok "Stopped ArchiveBox" msg_ok "Stopped Service"
msg_info "Upgrading Playwright" msg_info "Upgrading Playwright"
$STD uv pip install playwright --system $STD uv pip install playwright --system
@@ -46,11 +52,10 @@ function update_script() {
sudo -u archivebox archivebox init sudo -u archivebox archivebox init
msg_ok "Updated ArchiveBox" msg_ok "Updated ArchiveBox"
msg_info "Starting ArchiveBox" msg_info "Starting Service"
systemctl start archivebox systemctl start archivebox
msg_ok "Started ArchiveBox" msg_ok "Started Service"
msg_ok "Updated Successfully!"
msg_ok "Updated Successfully"
exit exit
} }

View File

@@ -22,7 +22,8 @@ $STD apt-get install -y \
libsasl2-dev \ libsasl2-dev \
procps \ procps \
dnsutils \ dnsutils \
ripgrep ripgrep \
chromium
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Python Dependencies" msg_info "Installing Python Dependencies"
@@ -32,7 +33,7 @@ $STD apt-get install -y \
python3-regex python3-regex
msg_ok "Installed Python Dependencies" msg_ok "Installed Python Dependencies"
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" NODE_MODULE="@postlight/parser@latest,single-file-cli@latest" setup_nodejs
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv
msg_info "Installing Playwright" msg_info "Installing Playwright"
@@ -40,7 +41,7 @@ $STD uv pip install playwright --system
$STD playwright install-deps chromium $STD playwright install-deps chromium
msg_ok "Installed Playwright" msg_ok "Installed Playwright"
msg_info "Installing Chromium and ArchiveBox" msg_info "Installing ArchiveBox"
mkdir -p /opt/archivebox/{data,.npm,.cache,.local} mkdir -p /opt/archivebox/{data,.npm,.cache,.local}
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox $STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local} chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
@@ -92,6 +93,7 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt -y autoremove
$STD apt-get -y autoclean $STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned" msg_ok "Cleaned"