mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-16 15:51:55 +00:00
Breaking: Hoarder > Karakeep (#3699)
* Breaking: Hoarder > Karakeep * json * Update hoarder.sh * formatting
This commit is contained in:
parent
5b73662d9c
commit
251f3c411d
@ -40,23 +40,23 @@ function update_script() {
|
||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||
$STD apt-get install -y graphicsmagick ghostscript
|
||||
fi
|
||||
cd /opt
|
||||
cd /opt || exit
|
||||
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
||||
mkdir -p /etc/hoarder
|
||||
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
|
||||
fi
|
||||
rm -rf /opt/hoarder
|
||||
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip")
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv hoarder-${RELEASE} /opt/hoarder
|
||||
cd /opt/hoarder/apps/web
|
||||
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
unzip -q v"${RELEASE}".zip
|
||||
mv karakeep-"${RELEASE}" /opt/hoarder
|
||||
cd /opt/hoarder/apps/web || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
|
||||
cd /opt/hoarder/apps/workers
|
||||
cd /opt/hoarder/apps/workers || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
export DATA_DIR=/opt/hoarder_data
|
||||
cd /opt/hoarder/packages/db
|
||||
cd /opt/hoarder/packages/db || exit
|
||||
$STD pnpm migrate
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
@ -65,7 +65,7 @@ function update_script() {
|
||||
systemctl start hoarder-browser hoarder-workers hoarder-web
|
||||
msg_ok "Started Services"
|
||||
msg_info "Cleaning up"
|
||||
rm -R /opt/v${RELEASE}.zip
|
||||
rm -R /opt/v"${RELEASE}".zip
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
|
85
ct/karakeep.sh
Normal file
85
ct/karakeep.sh
Normal file
@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: MickLesk (Canbiz) & vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://karakeep.app/
|
||||
|
||||
APP="karakeep"
|
||||
var_tags="bookmark"
|
||||
var_cpu="2"
|
||||
var_ram="4096"
|
||||
var_disk="10"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/karakeep ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
PREV_RELEASE=$(cat /opt/${APP}_version.txt)
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "${PREV_RELEASE}" ]]; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop karakeep-web karakeep-workers karakeep-browser
|
||||
msg_ok "Stopped Services"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
if [[ $(corepack -v) < "0.31.0" ]]; then
|
||||
$STD npm install -g corepack@0.31.0
|
||||
fi
|
||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||
$STD apt-get install -y graphicsmagick ghostscript
|
||||
fi
|
||||
cd /opt || exit
|
||||
if [[ -f /opt/karakeep/.env ]] && [[ ! -f /etc/karakeep/karakeep.env ]]; then
|
||||
mkdir -p /etc/karakeep
|
||||
mv /opt/karakeep/.env /etc/karakeep/karakeep.env
|
||||
fi
|
||||
rm -rf /opt/karakeep
|
||||
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
unzip -q "v${RELEASE}.zip"
|
||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||
cd /opt/karakeep/apps/web || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||
cd /opt/karakeep/apps/workers || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
export DATA_DIR=/opt/karakeep_data
|
||||
cd /opt/karakeep/packages/db || exit
|
||||
$STD pnpm migrate
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start karakeep-browser karakeep-workers karakeep-web
|
||||
msg_ok "Started Services"
|
||||
msg_info "Cleaning up"
|
||||
rm -R /opt/v"${RELEASE}".zip
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "Hoarder",
|
||||
"slug": "hoarder",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2024-12-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://docs.hoarder.app/",
|
||||
"website": "https://hoarder.app/",
|
||||
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/hoarder.svg",
|
||||
"description": "Hoarder is an AI-powered bookmarking tool that helps you save and organize your digital content. It automatically tags your links, notes, and images, making them easy to find later. With features like auto-fetching, lists, and full-text search, Hoarder is the perfect tool for anyone who wants to keep track of their digital life.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/hoarder.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 4096,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
34
frontend/public/json/karakeep.json
Normal file
34
frontend/public/json/karakeep.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "karakeep",
|
||||
"slug": "karakeep",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2025-04-06",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://docs.karakeep.app/",
|
||||
"website": "https://karakeep.app/",
|
||||
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/karakeep.svg",
|
||||
"description": "karakeep (formerly: hoarder) is an AI-powered bookmarking tool that helps you save and organize your digital content. It automatically tags your links, notes, and images, making them easy to find later. With features like auto-fetching, lists, and full-text search, karakeep is the perfect tool for anyone who wants to keep track of their digital life.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/karakeep.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 4096,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (Canbiz) & vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://hoarder.app/
|
||||
# Source: https://karakeep.app/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@ -34,8 +34,8 @@ chmod +x /usr/bin/yt-dlp
|
||||
msg_ok "Installed Additional Tools"
|
||||
|
||||
msg_info "Installing Meilisearch"
|
||||
cd /tmp
|
||||
curl -fsSL "https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb" -o $(basename "https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb")
|
||||
cd /tmp || exit
|
||||
curl -fsSL "https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb" -o "meilisearch.deb"
|
||||
$STD dpkg -i meilisearch.deb
|
||||
curl -fsSL "https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml" -o "/etc/meilisearch.toml"
|
||||
MASTER_KEY=$(openssl rand -base64 12)
|
||||
@ -58,30 +58,30 @@ $STD apt-get install -y nodejs
|
||||
$STD npm install -g corepack@0.31.0
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Installing Hoarder"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/hoarder-app/hoarder/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip")
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv hoarder-${RELEASE} /opt/hoarder
|
||||
cd /opt/hoarder
|
||||
msg_info "Installing karakeep"
|
||||
cd /opt || exit
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
unzip -q "v${RELEASE}.zip"
|
||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||
cd /opt/karakeep || exit
|
||||
corepack enable
|
||||
export PUPPETEER_SKIP_DOWNLOAD="true"
|
||||
export NEXT_TELEMETRY_DISABLED=1
|
||||
export CI="true"
|
||||
cd /opt/hoarder/apps/web
|
||||
cd /opt/karakeep/apps/web || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
|
||||
cd /opt/hoarder/apps/workers
|
||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||
cd /opt/karakeep/apps/workers || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
|
||||
export DATA_DIR=/opt/hoarder_data
|
||||
HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
||||
mkdir -p /etc/hoarder
|
||||
cat <<EOF >/etc/hoarder/hoarder.env
|
||||
export DATA_DIR=/opt/karakeep_data
|
||||
karakeep_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
||||
mkdir -p /etc/karakeep
|
||||
cat <<EOF >/etc/karakeep/karakeep.env
|
||||
SERVER_VERSION=$RELEASE
|
||||
NEXTAUTH_SECRET="$HOARDER_SECRET"
|
||||
NEXTAUTH_SECRET="$karakeep_SECRET"
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
DATA_DIR="$DATA_DIR"
|
||||
MEILI_ADDR="http://127.0.0.1:7700"
|
||||
@ -99,11 +99,11 @@ BROWSER_WEB_URL="http://127.0.0.1:9222"
|
||||
# INFERENCE_IMAGE_MODEL="gpt-4o-mini"
|
||||
EOF
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Hoarder"
|
||||
msg_ok "Installed karakeep"
|
||||
|
||||
msg_info "Running Database Migration"
|
||||
mkdir -p ${DATA_DIR}
|
||||
cd /opt/hoarder/packages/db
|
||||
cd /opt/karakeep/packages/db || exit
|
||||
$STD pnpm migrate
|
||||
msg_ok "Database Migration Completed"
|
||||
|
||||
@ -121,25 +121,25 @@ Restart=always
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/hoarder-web.service
|
||||
cat <<EOF >/etc/systemd/system/karakeep-web.service
|
||||
[Unit]
|
||||
Description=Hoarder Web
|
||||
Wants=network.target hoarder-workers.service
|
||||
After=network.target hoarder-workers.service
|
||||
Description=karakeep Web
|
||||
Wants=network.target karakeep-workers.service
|
||||
After=network.target karakeep-workers.service
|
||||
|
||||
[Service]
|
||||
ExecStart=pnpm start
|
||||
WorkingDirectory=/opt/hoarder/apps/web
|
||||
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||
WorkingDirectory=/opt/karakeep/apps/web
|
||||
EnvironmentFile=/etc/karakeep/karakeep.env
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/hoarder-browser.service
|
||||
cat <<EOF >/etc/systemd/system/karakeep-browser.service
|
||||
[Unit]
|
||||
Description=Hoarder Headless Browser
|
||||
Description=karakeep Headless Browser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
@ -151,16 +151,16 @@ Restart=always
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/hoarder-workers.service
|
||||
cat <<EOF >/etc/systemd/system/karakeep-workers.service
|
||||
[Unit]
|
||||
Description=Hoarder Workers
|
||||
Wants=network.target hoarder-browser.service meilisearch.service
|
||||
After=network.target hoarder-browser.service meilisearch.service
|
||||
Description=karakeep Workers
|
||||
Wants=network.target karakeep-browser.service meilisearch.service
|
||||
After=network.target karakeep-browser.service meilisearch.service
|
||||
|
||||
[Service]
|
||||
ExecStart=pnpm start:prod
|
||||
WorkingDirectory=/opt/hoarder/apps/workers
|
||||
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||
WorkingDirectory=/opt/karakeep/apps/workers
|
||||
EnvironmentFile=/etc/karakeep/karakeep.env
|
||||
Restart=always
|
||||
TimeoutStopSec=5
|
||||
|
||||
@ -168,7 +168,7 @@ TimeoutStopSec=5
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now meilisearch hoarder-browser hoarder-workers hoarder-web
|
||||
systemctl enable -q --now meilisearch karakeep-browser karakeep-workers karakeep-web
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
@ -176,7 +176,7 @@ customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /tmp/meilisearch.deb
|
||||
rm -f /opt/v${RELEASE}.zip
|
||||
rm -f /opt/v"${RELEASE}".zip
|
||||
$STD apt-get autoremove -y
|
||||
$STD apt-get autoclean -y
|
||||
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user