diff --git a/ct/beszel.sh b/ct/beszel.sh new file mode 100644 index 00000000..bd30dbbd --- /dev/null +++ b/ct/beszel.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) community-scripts ORG +# Author: Michelle Zitzerman (Sinofage) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://beszel.dev/ + +# App Default Values +APP="Beszel" +var_tags="monitoring" +var_cpu="1" +var_ram="512" +var_disk="5" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/beszel ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + /opt/beszel/beszel update + msg_error "Ther is currently no automatic update function for ${APP}." + 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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" \ No newline at end of file diff --git a/install/beszel-install.sh b/install/beszel-install.sh new file mode 100644 index 00000000..378570cf --- /dev/null +++ b/install/beszel-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Michelle Zitzerman (Sinofage) +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + tar \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Beszel" +mkdir -p /opt/beszel +curl -sL "https://github.com/henrygd/beszel/releases/latest/download/beszel_$(uname -s)_$(uname -m | sed -e 's/x86_64/amd64/' -e 's/armv6l/arm/' -e 's/armv7l/arm/' -e 's/aarch64/arm64/').tar.gz" | tar -xz -O beszel | tee /opt/beszel/beszel >/dev/null +chmod +x /opt/beszel/beszel +msg_ok "Installed Beszel" + +msg_info "Creating Service" +cat </etc/systemd/system/beszel-hub.service +[Unit] +Description=Beszel Hub Service +After=network.target + +[Service] +ExecStart=/opt/beszel/beszel serve --http "0.0.0.0:8090" +WorkingDirectory=/opt/beszel +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now beszel-hub.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/json/beszel.json b/json/beszel.json new file mode 100644 index 00000000..8a67b41b --- /dev/null +++ b/json/beszel.json @@ -0,0 +1,34 @@ +{ + "name": "Beszel", + "slug": "beszel", + "categories": [ + 9 + ], + "date_created": "2025-01-20", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8090, + "documentation": "https://beszel.dev/guide/what-is-beszel", + "website": "https://beszel.dev/", + "logo": "https://beszel.dev/icon.svg", + "description": "A lightweight server monitoring platform that provides Docker statistics, historical data, and alert functions\n ", + "install_methods": [ + { + "type": "default", + "script": "ct/beszel.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + } \ No newline at end of file