mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
Add nextExplorer
This commit is contained in:
71
ct/nextexplorer.sh
Normal file
71
ct/nextexplorer.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/vikramsoni2/nextExplorer
|
||||
|
||||
APP="nextExplorer"
|
||||
var_tags="${var_tags:-files;documents}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-8}"
|
||||
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/nextExplorer ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "nextExplorer" "vikramsoni2/nextExplorer"; then
|
||||
msg_info "Stopping nextExplorer"
|
||||
$STD systemctl stop nextexplorer
|
||||
msg_ok "Stopped nextExplorer"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nextExplorer" "vikramsoni2/nextExplorer" "tarball" "latest" "/opt/nextExplorer"
|
||||
|
||||
msg_info "Updating nextExplorer"
|
||||
APP_DIR="/opt/nextExplorer/app"
|
||||
mkdir -p "$APP_DIR"
|
||||
cd /opt/nextExplorer/backend
|
||||
export NODE_ENV=production
|
||||
$STD npm ci
|
||||
cd /opt/nextExplorer/frontend
|
||||
unset NODE_ENV
|
||||
export NODE_ENV=development
|
||||
$STD npm ci
|
||||
$STD npm run build -- --sourcemap false
|
||||
unset NODE_ENV
|
||||
cd /opt/nextExplorer/
|
||||
mv backend/{node_modules,src,package.json} "$APP_DIR"
|
||||
mv frontend/dist/ "$APP_DIR"/public
|
||||
msg_ok "Updated nextExplorer"
|
||||
|
||||
msg_info "Starting nextExplorer"
|
||||
$STD systemctl start nextexplorer
|
||||
msg_ok "Started nextExplorer"
|
||||
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}${CL}"
|
||||
Reference in New Issue
Block a user