Skip to content

Commit a7014e4

Browse files
committed
karakeep-install: remove yarn, remove MCP build commands, disable Playwright browser download
- add pnpm store prune to install and update to free some more space
1 parent 000b7d4 commit a7014e4

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

ct/karakeep.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ function update_script() {
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30+
31+
NODE_VERSION="22" \
32+
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/karakeep-app/karakeep/main/package.json | jq -r '.packageManager | split("@")[1]')" \
33+
setup_nodejs
34+
3035
RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3136
PREV_RELEASE=$(cat /opt/${APP}_version.txt)
3237
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "${PREV_RELEASE}" ]]; then
@@ -37,9 +42,6 @@ function update_script() {
3742
$STD yt-dlp --update-to nightly
3843
msg_ok "Updated yt-dlp"
3944
msg_info "Updating ${APP} to v${RELEASE}"
40-
if [[ $(corepack -v) < "0.31.0" ]]; then
41-
$STD npm install -g [email protected]
42-
fi
4345
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
4446
$STD apt-get install -y graphicsmagick ghostscript
4547
fi
@@ -52,6 +54,9 @@ function update_script() {
5254
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
5355
$STD unzip "v${RELEASE}.zip"
5456
mv karakeep-"${RELEASE}" /opt/karakeep
57+
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true"
58+
export NEXT_TELEMETRY_DISABLED=1
59+
export CI="true"
5560
cd /opt/karakeep/apps/web
5661
$STD pnpm install --frozen-lockfile
5762
$STD pnpm build
@@ -60,12 +65,10 @@ function update_script() {
6065
cd /opt/karakeep/apps/cli
6166
$STD pnpm install --frozen-lockfile
6267
$STD pnpm build
63-
cd /opt/karakeep/apps/mcp
64-
$STD pnpm install --frozen-lockfile
65-
$STD pnpm build
6668
export DATA_DIR=/opt/karakeep_data
6769
cd /opt/karakeep/packages/db
6870
$STD pnpm migrate
71+
$STD pnpm store prune
6972
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
7073
msg_ok "Updated ${APP} to v${RELEASE}"
7174

install/karakeep-install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ sed -i \
4848
/etc/meilisearch.toml
4949
msg_ok "Installed Meilisearch"
5050

51-
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
52-
$STD npm install -g [email protected]
51+
NODE_VERSION="22" \
52+
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/karakeep-app/karakeep/main/package.json | jq -r '.packageManager | split("@")[1]')" \
53+
setup_nodejs
54+
# $STD npm install -g [email protected]
5355

5456
msg_info "Installing karakeep"
5557
cd /opt
@@ -58,8 +60,8 @@ curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEAS
5860
$STD unzip "v${RELEASE}.zip"
5961
mv karakeep-"${RELEASE}" /opt/karakeep
6062
cd /opt/karakeep
61-
corepack enable
62-
export PUPPETEER_SKIP_DOWNLOAD="true"
63+
# corepack enable
64+
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true"
6365
export NEXT_TELEMETRY_DISABLED=1
6466
export CI="true"
6567
cd /opt/karakeep/apps/web
@@ -70,9 +72,7 @@ $STD pnpm install --frozen-lockfile
7072
cd /opt/karakeep/apps/cli
7173
$STD pnpm install --frozen-lockfile
7274
$STD pnpm build
73-
cd /opt/karakeep/apps/mcp
74-
$STD pnpm install --frozen-lockfile
75-
$STD pnpm build
75+
$STD pnpm store prune
7676

7777
export DATA_DIR=/opt/karakeep_data
7878
karakeep_SECRET=$(openssl rand -base64 36 | cut -c1-24)

0 commit comments

Comments
 (0)