mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-26 23:45:13 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fba2e34605 |
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/fredrikburmester/streamystats
|
||||
|
||||
APP="Streamystats"
|
||||
var_tags="${var_tags:-analytics;jellyfin}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/streamystats ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "streamystats" "fredrikburmester/streamystats"; then
|
||||
msg_info "Stopping Streamystats"
|
||||
systemctl stop streamystats-nextjs-app streamystats-job-server
|
||||
msg_ok "Stopped Streamystats"
|
||||
|
||||
msg_info "Updating Bun"
|
||||
$STD bun upgrade
|
||||
msg_ok "Updated Bun"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "streamystats" "fredrikburmester/streamystats" "tarball"
|
||||
|
||||
msg_info "Building Streamystats"
|
||||
cd /opt/streamystats
|
||||
$STD bun install --frozen-lockfile
|
||||
NEXT_TELEMETRY_DISABLED=1 NEXT_PUBLIC_VERSION="v$(cat ~/.streamystats)" $STD bun run build
|
||||
msg_ok "Built Streamystats"
|
||||
|
||||
msg_info "Migrating Streamystats Database"
|
||||
$STD bun --env-file=/opt/streamystats_data/.env run db:migrate
|
||||
msg_ok "Migrated Streamystats Database"
|
||||
|
||||
msg_info "Starting Streamystats"
|
||||
systemctl start streamystats-job-server streamystats-nextjs-app
|
||||
msg_ok "Started Streamystats"
|
||||
msg_ok "Updated successfully!"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ItzCrazyKns/Vane
|
||||
|
||||
APP="Vane"
|
||||
var_tags="${var_tags:-ai;search}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-12}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/vane ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "vane" "ItzCrazyKns/Vane"; then
|
||||
msg_info "Stopping Vane"
|
||||
systemctl stop vane
|
||||
msg_ok "Stopped Vane"
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "vane" "ItzCrazyKns/Vane" "tarball"
|
||||
|
||||
msg_info "Building Vane"
|
||||
cd /opt/vane
|
||||
$STD yarn install --frozen-lockfile --network-timeout 600000
|
||||
$STD yarn build
|
||||
$STD yarn cache clean
|
||||
rm -rf .next/cache
|
||||
cp -r public .next/standalone/
|
||||
cp -r .next/static .next/standalone/.next/
|
||||
cp -r drizzle .next/standalone/
|
||||
ln -s /opt/vane_data .next/standalone/data
|
||||
$STD npx playwright install --with-deps --only-shell chromium
|
||||
msg_ok "Built Vane"
|
||||
|
||||
msg_info "Starting Vane"
|
||||
systemctl start vane
|
||||
msg_ok "Started Vane"
|
||||
msg_ok "Updated Vane successfully!"
|
||||
fi
|
||||
|
||||
if check_for_gh_branch "searxng" "searxng/searxng" "master"; then
|
||||
msg_info "Stopping SearXNG"
|
||||
systemctl stop searxng
|
||||
msg_ok "Stopped SearXNG"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
fetch_and_deploy_gh_branch "searxng" "searxng/searxng" "master"
|
||||
|
||||
msg_info "Updating SearXNG"
|
||||
cd /opt/searxng
|
||||
$STD uv pip install -p /opt/searxng/.venv/bin/python -r requirements.txt -r requirements-server.txt
|
||||
msg_ok "Updated SearXNG"
|
||||
|
||||
msg_info "Starting SearXNG"
|
||||
systemctl start searxng
|
||||
msg_ok "Started SearXNG"
|
||||
msg_ok "Updated SearXNG successfully!"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/fredrikburmester/streamystats
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y unzip
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
||||
PG_DB_NAME="streamystats" PG_DB_USER="streamystats" PG_DB_EXTENSIONS="vector,pg_trgm,uuid-ossp" setup_postgresql_db
|
||||
|
||||
msg_info "Installing Bun"
|
||||
export BUN_INSTALL="/root/.bun"
|
||||
curl -fsSL https://bun.sh/install | $STD bash
|
||||
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
|
||||
ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx
|
||||
msg_ok "Installed Bun"
|
||||
|
||||
fetch_and_deploy_gh_release "streamystats" "fredrikburmester/streamystats" "tarball"
|
||||
|
||||
msg_info "Building Streamystats"
|
||||
cd /opt/streamystats
|
||||
$STD bun install --frozen-lockfile
|
||||
NEXT_TELEMETRY_DISABLED=1 NEXT_PUBLIC_VERSION="v$(cat ~/.streamystats)" $STD bun run build
|
||||
msg_ok "Built Streamystats"
|
||||
|
||||
msg_info "Configuring Streamystats"
|
||||
mkdir -p /opt/streamystats_data
|
||||
cat <<EOF >/opt/streamystats_data/.env
|
||||
NODE_ENV=production
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
DATABASE_URL=postgresql://streamystats:${PG_DB_PASS}@127.0.0.1:5432/streamystats
|
||||
JOB_SERVER_URL=http://127.0.0.1:3005
|
||||
NEXTJS_URL=http://127.0.0.1:3000
|
||||
SESSION_SECRET=$(openssl rand -hex 64)
|
||||
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||
EOF
|
||||
chmod 600 /opt/streamystats_data/.env
|
||||
msg_ok "Configured Streamystats"
|
||||
|
||||
msg_info "Migrating Streamystats Database"
|
||||
$STD bun --env-file=/opt/streamystats_data/.env run db:migrate
|
||||
msg_ok "Migrated Streamystats Database"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/streamystats-job-server.service
|
||||
[Unit]
|
||||
Description=Streamystats Job Server
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/streamystats/apps/job-server
|
||||
EnvironmentFile=/opt/streamystats_data/.env
|
||||
Environment=HOST=127.0.0.1
|
||||
Environment=PORT=3005
|
||||
ExecStart=/usr/local/bin/bun run start
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/streamystats-nextjs-app.service
|
||||
[Unit]
|
||||
Description=Streamystats Web
|
||||
After=network.target streamystats-job-server.service
|
||||
Wants=streamystats-job-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/streamystats/apps/nextjs-app
|
||||
EnvironmentFile=/opt/streamystats_data/.env
|
||||
Environment=PORT=3000
|
||||
ExecStart=/usr/local/bin/bun run start
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now streamystats-job-server streamystats-nextjs-app
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,116 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ItzCrazyKns/Vane
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
fetch_and_deploy_gh_branch "searxng" "searxng/searxng" "master"
|
||||
|
||||
msg_info "Setting up SearXNG"
|
||||
cd /opt/searxng
|
||||
$STD uv venv /opt/searxng/.venv
|
||||
$STD uv pip install -p /opt/searxng/.venv/bin/python -r requirements.txt -r requirements-server.txt
|
||||
mkdir -p /etc/searxng
|
||||
cat <<EOF >/etc/searxng/settings.yml
|
||||
use_default_settings: true
|
||||
general:
|
||||
instance_name: "SearXNG"
|
||||
server:
|
||||
bind_address: "127.0.0.1"
|
||||
port: 8888
|
||||
secret_key: "$(openssl rand -hex 32)"
|
||||
limiter: false
|
||||
image_proxy: false
|
||||
search:
|
||||
autocomplete: "google"
|
||||
formats:
|
||||
- html
|
||||
- json
|
||||
engines:
|
||||
- name: wolframalpha
|
||||
disabled: false
|
||||
EOF
|
||||
chmod 600 /etc/searxng/settings.yml
|
||||
msg_ok "Set up SearXNG"
|
||||
|
||||
fetch_and_deploy_gh_release "vane" "ItzCrazyKns/Vane" "tarball"
|
||||
|
||||
msg_info "Building Vane"
|
||||
cd /opt/vane
|
||||
$STD yarn install --frozen-lockfile --network-timeout 600000
|
||||
$STD yarn build
|
||||
$STD yarn cache clean
|
||||
rm -rf .next/cache
|
||||
cp -r public .next/standalone/
|
||||
cp -r .next/static .next/standalone/.next/
|
||||
cp -r drizzle .next/standalone/
|
||||
mkdir -p /opt/vane_data
|
||||
# The standalone server chdirs into its own directory and keeps config.json, db.sqlite and uploads in ./data
|
||||
ln -s /opt/vane_data .next/standalone/data
|
||||
msg_ok "Built Vane"
|
||||
|
||||
msg_info "Installing Chromium for Vane"
|
||||
$STD npx playwright install --with-deps --only-shell chromium
|
||||
msg_ok "Installed Chromium for Vane"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/searxng.service
|
||||
[Unit]
|
||||
Description=SearXNG for Vane
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/searxng
|
||||
Environment=SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
|
||||
ExecStart=/opt/searxng/.venv/bin/granian --interface wsgi --host 127.0.0.1 --port 8888 searx.webapp:app
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/vane.service
|
||||
[Unit]
|
||||
Description=Vane
|
||||
After=network.target searxng.service
|
||||
Wants=searxng.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/vane/.next/standalone
|
||||
Environment=NODE_ENV=production
|
||||
Environment=HOSTNAME=0.0.0.0
|
||||
Environment=PORT=3000
|
||||
Environment=SEARXNG_API_URL=http://127.0.0.1:8888
|
||||
ExecStart=/usr/bin/node /opt/vane/.next/standalone/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now searxng vane
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user