Merge branch 'community-scripts:main' into main
This commit is contained in:
@@ -207,7 +207,14 @@ EOF
|
||||
msg_info "Building HyperDX"
|
||||
$STD yarn install
|
||||
$STD yarn workspace @hyperdx/common-utils run build
|
||||
$STD yarn workspace @hyperdx/api run build
|
||||
rm -rf /opt/clickstack/packages/api/build
|
||||
yarn workspace @hyperdx/api exec tsc >>"$(get_active_logfile)" 2>&1 || true
|
||||
$STD yarn workspace @hyperdx/api exec tsc-alias
|
||||
cp -r /opt/clickstack/packages/api/src/opamp/proto /opt/clickstack/packages/api/build/opamp/ 2>/dev/null || true
|
||||
[[ -f /opt/clickstack/packages/api/build/index.js ]] || {
|
||||
msg_error "HyperDX API build failed: build/index.js not found"
|
||||
exit 1
|
||||
}
|
||||
$STD yarn workspace @hyperdx/app run build
|
||||
msg_ok "Built HyperDX"
|
||||
|
||||
|
||||
@@ -23,8 +23,10 @@ DATA_DIR=/opt/hoodik_data
|
||||
HTTP_PORT=5443
|
||||
HTTP_ADDRESS=0.0.0.0
|
||||
JWT_SECRET=${JWT_SECRET}
|
||||
APP_URL=http://127.0.0.1:5443
|
||||
APP_URL=http://${LOCAL_IP}:5443
|
||||
SSL_DISABLED=true
|
||||
COOKIE_SECURE=false
|
||||
COOKIE_HTTP_ONLY=false
|
||||
MAILER_TYPE=none
|
||||
RUST_LOG=hoodik=info,error=info
|
||||
EOF
|
||||
@@ -41,14 +43,14 @@ Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/hoodik_data
|
||||
EnvironmentFile=/opt/hoodik/.env
|
||||
ExecStart=/opt/hoodik
|
||||
ExecStart=/opt/hoodik/hoodik
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now hoodik.service
|
||||
systemctl enable -q --now hoodik
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -14,36 +14,28 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential
|
||||
$STD apt install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
||||
|
||||
msg_info "Installing pg_search from ParadeDB"
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
CODENAME=$(. /etc/os-release && echo "${VERSION_CODENAME:-bookworm}")
|
||||
PDB_VERSION=$(curl -fsSL "https://api.github.com/repos/paradedb/paradedb/releases/latest" | grep -oP '"tag_name":\s*"\K[^"]+')
|
||||
PDB_VERSION_NUM="${PDB_VERSION#v}"
|
||||
DEB_NAME="postgresql-17-pg-search_${PDB_VERSION_NUM}-1PARADEDB-${CODENAME}_${ARCH}.deb"
|
||||
DEB_URL="https://github.com/paradedb/paradedb/releases/download/${PDB_VERSION}/${DEB_NAME}"
|
||||
curl -fsSL -o "/tmp/${DEB_NAME}" "$DEB_URL"
|
||||
dpkg -i "/tmp/${DEB_NAME}" >/dev/null 2>&1 || $STD apt install -f -y
|
||||
rm -f "/tmp/${DEB_NAME}"
|
||||
msg_ok "Installed pg_search from ParadeDB"
|
||||
fetch_and_deploy_gh_release "paradedb" "paradedb/paradedb" "binary" "latest" "" "postgresql-17-pg-search_*-1PARADEDB-${CODENAME}_$(dpkg --print-architecture).deb"
|
||||
|
||||
msg_info "Configuring pg_search preload library"
|
||||
if ! grep -q "shared_preload_libraries.*pg_search" /etc/postgresql/17/main/postgresql.conf; then
|
||||
echo "shared_preload_libraries = 'pg_search'" >>/etc/postgresql/17/main/postgresql.conf
|
||||
fi
|
||||
systemctl restart postgresql
|
||||
msg_ok "Configured pg_search preload library"
|
||||
|
||||
PG_DB_NAME="lobehub" PG_DB_USER="lobehub" PG_DB_EXTENSIONS="vector,pg_search" setup_postgresql_db
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Installing pnpm"
|
||||
$STD npm install -g pnpm
|
||||
msg_ok "Installed pnpm"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "lobehub" "lobehub/lobehub" "tarball"
|
||||
|
||||
msg_info "Building Application"
|
||||
cd /opt/lobehub
|
||||
export NODE_OPTIONS="--max-old-space-size=8192"
|
||||
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}"
|
||||
export DATABASE_DRIVER="node"
|
||||
export KEY_VAULTS_SECRET="$(openssl rand -base64 32)"
|
||||
@@ -51,7 +43,6 @@ export AUTH_SECRET="$(openssl rand -base64 32)"
|
||||
export APP_URL="http://localhost:3210"
|
||||
$STD pnpm install
|
||||
$STD pnpm run build:docker
|
||||
unset NODE_OPTIONS
|
||||
msg_ok "Built Application"
|
||||
|
||||
msg_info "Configuring Application"
|
||||
|
||||
@@ -26,13 +26,8 @@ fetch_and_deploy_gh_release "puter" "HeyPuter/puter" "tarball"
|
||||
|
||||
msg_info "Building Application"
|
||||
cd /opt/puter
|
||||
node -e "const f=require('fs'),p=JSON.parse(f.readFileSync('package.json'));p.overrides={'better-sqlite3':'>=12.0.0'};f.writeFileSync('package.json',JSON.stringify(p,null,2))"
|
||||
rm -f package-lock.json
|
||||
$STD npm install
|
||||
cd /opt/puter/src/gui
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
cd /opt/puter
|
||||
cp -r src/gui/dist dist
|
||||
msg_ok "Built Application"
|
||||
|
||||
msg_info "Creating Directories"
|
||||
@@ -43,10 +38,10 @@ msg_info "Configuring Application"
|
||||
cat <<EOF >/etc/puter/config.json
|
||||
{
|
||||
"config_name": "proxmox",
|
||||
"domain": "${LOCAL_IP}",
|
||||
"domain": "${LOCAL_IP}.nip.io",
|
||||
"protocol": "http",
|
||||
"http_port": 4100,
|
||||
"experimental_no_subdomain": true,
|
||||
"allow_nipio_domains": true,
|
||||
"services": {
|
||||
"database": {
|
||||
"engine": "sqlite",
|
||||
@@ -67,8 +62,8 @@ After=network.target
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/puter
|
||||
Environment=CONFIG_PATH=/etc/puter
|
||||
ExecStart=/usr/bin/npm start
|
||||
Environment=PUTER_CONFIG_PATH=/etc/puter/config.json
|
||||
ExecStart=/usr/bin/node --enable-source-maps -r /opt/puter/dist/src/backend/telemetry.js /opt/puter/dist/src/backend/index.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
242
install/stoatchat-install.sh
Normal file
242
install/stoatchat-install.sh
Normal file
@@ -0,0 +1,242 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/stoatchat/stoatchat
|
||||
|
||||
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 \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
build-essential \
|
||||
git \
|
||||
redis-server \
|
||||
rabbitmq-server \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mongodb
|
||||
|
||||
msg_info "Configuring RabbitMQ"
|
||||
systemctl enable -q --now rabbitmq-server
|
||||
until rabbitmqctl status &>/dev/null; do sleep 1; done
|
||||
$STD rabbitmqctl add_user rabbituser rabbitpass
|
||||
$STD rabbitmqctl set_permissions -p / rabbituser ".*" ".*" ".*"
|
||||
msg_ok "Configured RabbitMQ"
|
||||
|
||||
setup_rust
|
||||
|
||||
fetch_and_deploy_gh_release "stoatchat" "stoatchat/stoatchat" "tarball"
|
||||
|
||||
msg_info "Building Backend (Patience)"
|
||||
cd /opt/stoatchat
|
||||
$STD cargo build --release --bins -j 2
|
||||
msg_ok "Built Backend"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Installing pnpm"
|
||||
$STD npm install -g pnpm@10.28.1
|
||||
msg_ok "Installed pnpm"
|
||||
|
||||
msg_info "Cloning Web Frontend"
|
||||
FORWEB_VERSION=$(get_latest_github_release "stoatchat/for-web")
|
||||
$STD git clone --recursive "https://github.com/stoatchat/for-web" /opt/stoatchat-web
|
||||
$STD git -C /opt/stoatchat-web checkout "$FORWEB_VERSION"
|
||||
$STD git -C /opt/stoatchat-web submodule update --init --recursive
|
||||
msg_ok "Cloned Web Frontend"
|
||||
|
||||
msg_info "Building Web Frontend"
|
||||
cd /opt/stoatchat-web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter stoat.js build
|
||||
$STD pnpm --filter solid-livekit-components build
|
||||
$STD pnpm --filter "@lingui-solid/babel-plugin-lingui-macro" build
|
||||
$STD pnpm --filter "@lingui-solid/babel-plugin-extract-messages" build
|
||||
$STD pnpm --filter client exec lingui compile --typescript
|
||||
$STD pnpm --filter client exec node scripts/copyAssets.mjs
|
||||
$STD pnpm --filter client exec panda codegen
|
||||
VITE_API_URL="http://${LOCAL_IP}/api" \
|
||||
VITE_WS_URL="ws://${LOCAL_IP}/ws" \
|
||||
VITE_MEDIA_URL="http://${LOCAL_IP}/autumn" \
|
||||
VITE_PROXY_URL="http://${LOCAL_IP}/january" \
|
||||
$STD pnpm --filter client exec vite build
|
||||
msg_ok "Built Web Frontend"
|
||||
|
||||
fetch_and_deploy_gh_release "minio" "minio/minio" "singlefile" "latest" "/opt/stoatchat" "minio_linux_amd64"
|
||||
mv /opt/stoatchat/minio_linux_amd64 /usr/local/bin/minio
|
||||
chmod +x /usr/local/bin/minio
|
||||
|
||||
fetch_and_deploy_gh_release "mc" "minio/mc" "singlefile" "latest" "/opt/stoatchat" "mc_linux_amd64"
|
||||
mv /opt/stoatchat/mc_linux_amd64 /usr/local/bin/mc
|
||||
chmod +x /usr/local/bin/mc
|
||||
|
||||
msg_info "Configuring MinIO"
|
||||
mkdir -p /opt/stoatchat/data/minio
|
||||
cat <<EOF >/etc/systemd/system/stoatchat-minio.service
|
||||
[Unit]
|
||||
Description=Stoatchat MinIO Object Storage
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Environment=MINIO_ROOT_USER=minioautumn
|
||||
Environment=MINIO_ROOT_PASSWORD=minioautumn
|
||||
ExecStart=/usr/local/bin/minio server /opt/stoatchat/data/minio --console-address :9001
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now stoatchat-minio
|
||||
msg_ok "Configured MinIO"
|
||||
|
||||
msg_info "Creating MinIO Bucket"
|
||||
until mc alias set local http://127.0.0.1:9000 minioautumn minioautumn &>/dev/null; do sleep 1; done
|
||||
$STD mc mb local/revolt-uploads
|
||||
msg_ok "Created MinIO Bucket"
|
||||
|
||||
FILES_ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||
|
||||
msg_info "Creating Configuration"
|
||||
cat <<EOF >/Revolt.toml
|
||||
[database]
|
||||
mongodb = "mongodb://127.0.0.1:27017"
|
||||
redis = "redis://127.0.0.1:6379/"
|
||||
|
||||
[hosts]
|
||||
app = "http://${LOCAL_IP}"
|
||||
api = "http://${LOCAL_IP}/api"
|
||||
events = "ws://${LOCAL_IP}/ws"
|
||||
autumn = "http://${LOCAL_IP}/autumn"
|
||||
january = "http://${LOCAL_IP}/january"
|
||||
|
||||
[rabbit]
|
||||
host = "127.0.0.1"
|
||||
port = 5672
|
||||
username = "rabbituser"
|
||||
password = "rabbitpass"
|
||||
|
||||
[files]
|
||||
encryption_key = "${FILES_ENCRYPTION_KEY}"
|
||||
|
||||
[files.s3]
|
||||
endpoint = "http://127.0.0.1:9000"
|
||||
path_style_buckets = true
|
||||
region = "minio"
|
||||
access_key_id = "minioautumn"
|
||||
secret_access_key = "minioautumn"
|
||||
default_bucket = "revolt-uploads"
|
||||
|
||||
[api.registration]
|
||||
invite_only = false
|
||||
EOF
|
||||
ln -sf /Revolt.toml /opt/stoatchat/Revolt.toml
|
||||
msg_ok "Created Configuration"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<EOF >/etc/nginx/sites-available/stoatchat
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
client_max_body_size 20M;
|
||||
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:14702;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_pass http://127.0.0.1:14703;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
}
|
||||
|
||||
location /autumn {
|
||||
proxy_pass http://127.0.0.1:14704;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /january {
|
||||
proxy_pass http://127.0.0.1:14705;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /opt/stoatchat-web/packages/client/dist;
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/stoatchat /etc/nginx/sites-enabled/stoatchat
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
systemctl enable -q --now nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Creating Backend Services"
|
||||
for SVC in api events autumn january crond; do
|
||||
case $SVC in
|
||||
api)
|
||||
PORT=14702
|
||||
BIN=delta
|
||||
;;
|
||||
events)
|
||||
PORT=14703
|
||||
BIN=bonfire
|
||||
;;
|
||||
autumn)
|
||||
PORT=14704
|
||||
BIN=autumn
|
||||
;;
|
||||
january)
|
||||
PORT=14705
|
||||
BIN=january
|
||||
;;
|
||||
crond)
|
||||
PORT=0
|
||||
BIN=crond
|
||||
;;
|
||||
esac
|
||||
cat <<EOF >/etc/systemd/system/stoatchat-${SVC}.service
|
||||
[Unit]
|
||||
Description=Stoatchat ${SVC} service
|
||||
After=network.target stoatchat-minio.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/stoatchat
|
||||
ExecStart=/opt/stoatchat/target/release/${BIN}
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now "stoatchat-${SVC}"
|
||||
done
|
||||
msg_ok "Created Backend Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
71
install/xyops-install.sh
Normal file
71
install/xyops-install.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/pixlcore/xyops
|
||||
|
||||
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 \
|
||||
python3 \
|
||||
python3-setuptools \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
zlib1g-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "xyops" "pixlcore/xyops" "tarball"
|
||||
|
||||
msg_info "Building Application"
|
||||
cd /opt/xyops
|
||||
$STD npm install
|
||||
$STD node bin/build.js dist
|
||||
chmod 644 /opt/xyops/node_modules/useragent-ng/lib/regexps.js
|
||||
msg_ok "Built Application"
|
||||
|
||||
fetch_and_deploy_gh_release "xysat" "pixlcore/xysat" "tarball" "latest" "/opt/xyops/satellite"
|
||||
|
||||
msg_info "Building xySat Satellite"
|
||||
cd /opt/xyops/satellite
|
||||
$STD npm install
|
||||
msg_ok "Built xySat Satellite"
|
||||
|
||||
msg_info "Setting up Directories"
|
||||
mkdir -p /opt/xyops/data /opt/xyops/logs /opt/xyops/temp /opt/xyops/conf
|
||||
msg_ok "Set up Directories"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/xyops.service
|
||||
[Unit]
|
||||
Description=xyOps Task Scheduler and Server Monitor
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/xyops
|
||||
Environment=XYOPS_foreground=1
|
||||
ExecStart=/usr/bin/node /opt/xyops/lib/main.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now xyops
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user