mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-31 06:24:02 -04:00
various scripts: use setup_meilisearch function (#11259)
This commit is contained in:
committed by
GitHub
parent
ebb48f697c
commit
3a04923479
@@ -25,20 +25,7 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "monolith" "Y2Z/monolith" "singlefile" "latest" "/usr/bin" "monolith-gnu-linux-x86_64"
|
||||
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp-nightly-builds" "singlefile" "latest" "/usr/bin" "yt-dlp_linux"
|
||||
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
|
||||
|
||||
msg_info "Configuring Meilisearch"
|
||||
curl -fsSL "https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml" -o "/etc/meilisearch.toml"
|
||||
MASTER_KEY=$(openssl rand -base64 12)
|
||||
sed -i \
|
||||
-e 's|^env =.*|env = "production"|' \
|
||||
-e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
|
||||
-e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
|
||||
-e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
|
||||
-e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
|
||||
-e 's|^# no_analytics = true|no_analytics = true|' \
|
||||
/etc/meilisearch.toml
|
||||
msg_ok "Configured Meilisearch"
|
||||
setup_meilisearch
|
||||
|
||||
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep" "tarball"
|
||||
cd /opt/karakeep
|
||||
@@ -70,7 +57,7 @@ NEXTAUTH_SECRET="$karakeep_SECRET"
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
DATA_DIR=${DATA_DIR}
|
||||
MEILI_ADDR="http://127.0.0.1:7700"
|
||||
MEILI_MASTER_KEY="$MASTER_KEY"
|
||||
MEILI_MASTER_KEY="$MEILISEARCH_MASTER_KEY"
|
||||
BROWSER_WEB_URL="http://127.0.0.1:9222"
|
||||
DB_WAL_MODE=true
|
||||
|
||||
@@ -109,19 +96,6 @@ $STD pnpm migrate
|
||||
msg_ok "Database Migration Completed"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/meilisearch.service
|
||||
[Unit]
|
||||
Description=Meilisearch
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/karakeep-web.service
|
||||
[Unit]
|
||||
Description=karakeep Web
|
||||
@@ -169,7 +143,7 @@ TimeoutStopSec=5
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now meilisearch karakeep-browser karakeep-workers karakeep-web
|
||||
systemctl enable -q --now karakeep-browser karakeep-workers karakeep-web
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
|
||||
Reference in New Issue
Block a user