From 5b30d4cfd4bc9c894b5aae25f884cc9d17743fec Mon Sep 17 00:00:00 2001 From: DragoQC Date: Tue, 25 Nov 2025 16:58:29 -0500 Subject: [PATCH] Added files --- ct/discopanel.sh | 84 +++++++++++++++++++++++++++++++++++ ct/headers/discopanel | 5 +++ install/discopanel-install.sh | 83 ++++++++++++++++++++++++++++++++++ json/discopanel.json | 35 +++++++++++++++ 4 files changed, 207 insertions(+) create mode 100644 ct/discopanel.sh create mode 100644 ct/headers/discopanel create mode 100644 install/discopanel-install.sh create mode 100644 json/discopanel.json diff --git a/ct/discopanel.sh b/ct/discopanel.sh new file mode 100644 index 000000000..e4402bec8 --- /dev/null +++ b/ct/discopanel.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/DragoQC/proxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: DragoQC +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://discopanel.app/ + +APP="DiscoPanel" +var_tags="${var_tags:-gaming}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-8096}" +var_disk="${var_disk:-20}" +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 "/opt/discopanel" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + LATEST=$(curl -fsSL https://api.github.com/repos/nickheyer/discopanel/releases/latest \ + grep '"tag_name":' | cut -d'"' -f4) + + CURRENT=$(cat /opt/${APP}_version.txt 2>/dev/null || echo "none") + + if [[ "$LATEST" == "$CURRENT" ]]; then + msg_ok "${APP} is already at ${LATEST}" + exit + fi + + msg_info "Updating ${APP} from ${CURRENT} → ${LATEST}" + + systemctl stop "${APP}" + + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}" + msg_ok "Backup Created" + + rm -rf /opt/${APP} + + msg_info "Downloading ${APP} ${LATEST}" + git clone --branch "$LATEST" --depth 1 \ + https://github.com/nickheyer/discopanel.git \ + /opt/${APP} + msg_ok "Downloaded ${APP} ${LATEST}" + + + msg_info "Building frontend" + cd /opt/${APP}/web/discopanel || exit + npm install + npm run build + msg_ok "Frontend Built" + + msg_info "Building backend" + cd /opt/${APP} || exit + go build -o discopanel cmd/discopanel/main.go + msg_ok "Backend Built" + + echo "$LATEST" >/opt/${APP}_version.txt + + systemctl start "${APP}" + msg_ok "Update Successful → now at ${LATEST}" +} + +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}" diff --git a/ct/headers/discopanel b/ct/headers/discopanel new file mode 100644 index 000000000..c5b2c3f46 --- /dev/null +++ b/ct/headers/discopanel @@ -0,0 +1,5 @@ +_________ _ ____ + / __ \(_)_________ ____ / __ \____ __________ __ + / / / / / ___/ ___/ __ \ / /_/ / __ \/ __ / _ \/ / + / /_/ / (__ \ / |_ | /_/ / / ___/ /_/ / / / / ___/ / +/_____/\/____/ \___| \___/ /__/ /___, _/_/ /_/\____/_/ diff --git a/install/discopanel-install.sh b/install/discopanel-install.sh new file mode 100644 index 000000000..ce10cf8c3 --- /dev/null +++ b/install/discopanel-install.sh @@ -0,0 +1,83 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: DragoQC +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://discopanel.app/ + +# Import Functions und Setup +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +get_latest_release() { + curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + ca-certificates \ + git \ + curl \ + npm \ + golang +msg_ok "Installed Dependencies" + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json +$STD sh <(curl -fsSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +DISCOPANEL_LATEST_VERSION=$(get_latest_release "nickheyer/discopanel") +msg_info "Installing DiscoPanel ${DISCOPANEL_LATEST_VERSION}" +git clone https://github.com/nickheyer/discopanel.git /opt/"${APPLICATION}" +msg_ok "Installed DiscoPanel ${DISCOPANEL_LATEST_VERSION}" + +msg_info "Building DiscoPanel frontend Application" +cd /opt/"${APPLICATION}"/web/discopanel || exit +npm install +npm run build +msg_ok "Builded DiscoPanel frontend Application" + +msg_info "Building DiscoPanel backend Application" +cd /opt/"${APPLICATION}" || exit +go build -o discopanel cmd/discopanel/main.go + +echo "$DISCOPANEL_LATEST_VERSION" >/opt/"${APPLICATION}"_version.txt +msg_ok "Builded DiscoPanel backend Application" + +msg_info "Creating Service" +cat </etc/systemd/system/"${APPLICATION}".service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +WorkingDirectory=/opt/${APPLICATION} +ExecStart=/opt/${APPLICATION}/discopanel +Restart=always +User=root +Environment=PORT=8080 + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now "${APPLICATION}" +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/discopanel.json b/json/discopanel.json new file mode 100644 index 000000000..4f73a3fcc --- /dev/null +++ b/json/discopanel.json @@ -0,0 +1,35 @@ +{ + "name": "DiscoPanel", + "slug": "disco-panel", + "categories": [ + 24 + ], + "date_created": "2025-11-26", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8080, + "documentation": "https://discopanel.app/docs/", + "config_path": "", + "website": "https://discopanel.app/", + "logo": "https://discopanel.app/g1_256x256.png", + "description": "The Minecraft Server Manager that Actually Works\nBuilt by someone who was tired of bloated control panels that require a PhD to operate and still manage to break at the worst possible moment.", + "install_methods": [ + { + "type": "default", + "script": "ct/disco-panel.sh", + "resources": { + "cpu": 4, + "ram": 8096, + "hdd": 20, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file