karakeep: Run workers in prod without tsx (#6285)

- may improve performance on slow-ass devices
- slightly increases build time
This commit is contained in:
Chris 2025-07-28 01:29:00 -04:00 committed by GitHub
parent b80ad6655f
commit 3676dff24e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -52,6 +52,10 @@ function update_script() {
rm -rf /opt/karakeep
msg_ok "Update prepared"
if grep -q "start:prod" /etc/systemd/system/karakeep-workers.service; then
sed -i 's|^ExecStart=.*$|ExecStart=/usr/bin/node dist/index.mjs|' /etc/systemd/system/karakeep-workers.service
systemctl daemon-reload
fi
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep"
if command -v corepack >/dev/null; then
$STD corepack disable
@ -70,6 +74,7 @@ function update_script() {
$STD pnpm build
cd /opt/karakeep/apps/workers
$STD pnpm install --frozen-lockfile
$STD pnpm build
cd /opt/karakeep/apps/cli
$STD pnpm install --frozen-lockfile
$STD pnpm build

View File

@ -64,6 +64,7 @@ $STD pnpm install --frozen-lockfile
$STD pnpm build
cd /opt/karakeep/apps/workers
$STD pnpm install --frozen-lockfile
$STD pnpm build
cd /opt/karakeep/apps/cli
$STD pnpm install --frozen-lockfile
$STD pnpm build
@ -167,7 +168,7 @@ Wants=network.target karakeep-browser.service meilisearch.service
After=network.target karakeep-browser.service meilisearch.service
[Service]
ExecStart=pnpm start:prod
ExecStart=/usr/bin/node dist/index.mjs
WorkingDirectory=/opt/karakeep/apps/workers
EnvironmentFile=/etc/karakeep/karakeep.env
Restart=always