Merge branch 'community-scripts:main' into nodecast-tv

This commit is contained in:
Luís Oliveira 2026-01-14 13:43:53 +00:00 committed by GitHub
commit 371a037d56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 169 additions and 23 deletions

View File

@ -10,8 +10,8 @@ var_tags="${var_tags:-email;archive;smtp}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"

57
ct/thingsboard.sh Normal file
View File

@ -0,0 +1,57 @@
#!/usr/bin/env bash
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
# 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/thingsboard/thingsboard
APP="ThingsBoard"
var_tags="${var_tags:-iot;platform}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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 /usr/share/thingsboard ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "thingsboard" "thingsboard/thingsboard"; then
msg_info "Stopping Service"
systemctl stop thingsboard
msg_ok "Stopped Service"
fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb"
msg_info "Running Database Upgrade"
$STD /usr/share/thingsboard/bin/install/upgrade.sh
msg_ok "Database Upgraded"
msg_info "Starting Service"
systemctl start thingsboard
msg_ok "Started Service"
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 "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

View File

@ -0,0 +1,48 @@
{
"name": "ThingsBoard",
"slug": "thingsboard",
"categories": [
7
],
"date_created": "2026-01-14",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://thingsboard.io/docs/",
"website": "https://thingsboard.io/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/thingsboard.webp",
"config_path": "/etc/thingsboard/conf/thingsboard.conf",
"description": "ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management. It enables device connectivity via industry standard IoT protocols - MQTT, CoAP and HTTP and supports both cloud and on-premises deployments.",
"install_methods": [
{
"type": "default",
"script": "ct/thingsboard.sh",
"resources": {
"cpu": 4,
"ram": 4096,
"hdd": 10,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "sysadmin@thingsboard.org",
"password": "sysadmin"
},
"notes": [
{
"text": "Please allow up to 90 seconds for the Web UI to start",
"type": "info"
},
{
"text": "Additional demo accounts: tenant@thingsboard.org / tenant and customer@thingsboard.org / customer",
"type": "info"
},
{
"text": "Change passwords for all accounts in the account profile page after first login",
"type": "warning"
}
]
}

View File

@ -22,12 +22,12 @@ $STD apt install -y \
poppler-utils \
unrtf \
tnef \
clamav \
clamav-daemon \
memcached \
sysstat \
python3 \
python3-mysqldb
python3-mysqldb \
ca-certificates \
gnupg
msg_ok "Installed Dependencies"
import_local_ip
@ -36,26 +36,17 @@ MARIADB_DB_NAME="piler" MARIADB_DB_USER="piler" setup_mysql_db
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap,gd,memcached,pdo,mysql,curl,zip" setup_php
msg_info "Installing Manticore Search"
curl -fsSL https://repo.manticoresearch.com/manticore-repo.noarch.deb -o /tmp/manticore-repo.deb
$STD dpkg -i /tmp/manticore-repo.deb
cd /tmp
wget -q https://repo.manticoresearch.com/manticore-repo.noarch.deb
$STD dpkg -i /tmp/manticore-repo.noarch.deb
$STD apt update
$STD apt install -y manticore manticore-extra
rm -f /tmp/manticore-repo.deb
$STD apt install -y manticore manticore-columnar-lib manticore-extra
rm -f /tmp/manticore-repo.noarch.deb
$STD systemctl stop manticore
$STD systemctl disable manticore
msg_ok "Installed Manticore Search"
msg_info "Installing Piler"
VERSION="1.4.8"
cd /tmp
curl -fsSL "https://github.com/jsuto/piler/releases/download/piler-${VERSION}/piler_${VERSION}-bookworm_amd64.deb" -o piler.deb
curl -fsSL "https://github.com/jsuto/piler/releases/download/piler-${VERSION}/piler-webui_${VERSION}-bookworm_amd64.deb" -o piler-webui.deb
$STD dpkg -i piler.deb
$STD apt-get -f install -y
$STD dpkg -i piler-webui.deb
$STD apt-get -f install -y
rm -f piler.deb piler-webui.deb
msg_ok "Installed Piler v${VERSION}"
fetch_and_deploy_gh_release "piler" "jsuto/piler" "binary" "latest" "/tmp" "piler_*-noble-*_amd64.deb"
msg_info "Configuring Piler Database"
cd /usr/local/share/piler
@ -64,7 +55,6 @@ msg_ok "Configured Piler Database"
msg_info "Configuring Piler"
PILER_KEY=$(openssl rand -hex 16)
cat <<EOF >/etc/piler/piler.conf
hostid=piler.${LOCAL_IP}.nip.io
update_counters_to_memcached=1

View File

@ -0,0 +1,51 @@
#!/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/thingsboard/thingsboard
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 \
libharfbuzz0b \
fontconfig \
fonts-dejavu-core
msg_ok "Installed Dependencies"
JAVA_VERSION="17" setup_java
PG_VERSION="16" setup_postgresql
PG_DB_NAME="thingsboard_db" PG_DB_USER="thingsboard" setup_postgresql_db
fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb"
msg_info "Configuring ThingsBoard"
cat >/etc/thingsboard/conf/thingsboard.conf <<EOF
# DB Configuration
export DATABASE_TS_TYPE=sql
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/${PG_DB_NAME}
export SPRING_DATASOURCE_USERNAME=${PG_DB_USER}
export SPRING_DATASOURCE_PASSWORD=${PG_DB_PASS}
# Specify partitioning size for timestamp key-value storage. Allowed values: DAYS, MONTHS, YEARS, INDEFINITE.
export SQL_POSTGRES_TS_KV_PARTITIONING=MONTHS
EOF
systemctl daemon-reload
msg_ok "Configured ThingsBoard"
msg_info "Running ThingsBoard Installation Script"
$STD /usr/share/thingsboard/bin/install/install.sh --loadDemo
msg_ok "Ran Installation Script"
msg_info "Starting ThingsBoard Service"
systemctl enable -q --now thingsboard
msg_ok "Started ThingsBoard Service"
motd_ssh
customize
cleanup_lxc