mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Merge branch 'tteck:main' into ghostfolio
This commit is contained in:
commit
6ab8d7aa4d
8 changed files with 187 additions and 9 deletions
|
@ -66,7 +66,7 @@ Pin: version ${RELEASE}
|
|||
Pin-Priority: 1001
|
||||
EOF
|
||||
apt-get update
|
||||
apt-get install -y nginx=1.26.1*
|
||||
apt-get install -y nginx=1.26.2*
|
||||
apt-get install -y bunkerweb=${RELEASE}
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
|
|
84
ct/openwebui.sh
Normal file
84
ct/openwebui.sh
Normal file
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: tteck
|
||||
# Co-Author: havardthom
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _ __ __ __ ______
|
||||
/ __ \____ ___ ____ | | / /__ / /_ / / / / _/
|
||||
/ / / / __ \/ _ \/ __ \ | | /| / / _ \/ __ \/ / / // /
|
||||
/ /_/ / /_/ / __/ / / / | |/ |/ / __/ /_/ / /_/ // /
|
||||
\____/ .___/\___/_/ /_/ |__/|__/\___/_.___/\____/___/
|
||||
/_/
|
||||
|
||||
EOF
|
||||
}
|
||||
header_info
|
||||
echo -e "Loading..."
|
||||
APP="Open WebUI"
|
||||
var_disk="16"
|
||||
var_cpu="4"
|
||||
var_ram="4096"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function default_settings() {
|
||||
CT_TYPE="1"
|
||||
PW=""
|
||||
CT_ID=$NEXTID
|
||||
HN=$NSAPP
|
||||
DISK_SIZE="$var_disk"
|
||||
CORE_COUNT="$var_cpu"
|
||||
RAM_SIZE="$var_ram"
|
||||
BRG="vmbr0"
|
||||
NET="dhcp"
|
||||
GATE=""
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
DISABLEIP6="no"
|
||||
MTU=""
|
||||
SD=""
|
||||
NS=""
|
||||
MAC=""
|
||||
VLAN=""
|
||||
SSH="no"
|
||||
VERB="no"
|
||||
echo_default
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/open-webui ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
msg_info "Updating ${APP} (Patience)"
|
||||
cd /opt/open-webui
|
||||
output=$(git pull --no-rebase)
|
||||
if echo "$output" | grep -q "Already up to date."
|
||||
then
|
||||
msg_ok "$APP is already up to date."
|
||||
exit
|
||||
fi
|
||||
systemctl stop open-webui.service
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
cd ./backend
|
||||
pip install -r requirements.txt -U &>/dev/null
|
||||
systemctl start open-webui.service
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${APP} should be reachable by going to the following URL.
|
||||
${BL}http://${IP}:8080${CL} \n"
|
|
@ -68,6 +68,8 @@ function update_script() {
|
|||
pnpm i &>/dev/null
|
||||
pnpm run build &>/dev/null
|
||||
cp -r .next/static .next/standalone/.next/
|
||||
mkdir -p /opt/peanut/.next/standalone/config
|
||||
ln -sf /etc/peanut/settings.yml /opt/peanut/.next/standalone/config/settings.yml
|
||||
systemctl start peanut
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to ${RELEASE}"
|
||||
|
|
|
@ -57,7 +57,7 @@ function update_script() {
|
|||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
|
||||
|
||||
VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
@ -73,7 +73,7 @@ function update_script() {
|
|||
|
||||
header_info
|
||||
if [ "$UPD" == "1" ]; then
|
||||
echo -e "\n ⚠️ Ensure you set 4vCPU & 4096MiB RAM minimum!!! \n"
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
|
||||
msg_info "Stopping Vaultwarden"
|
||||
systemctl stop vaultwarden.service
|
||||
msg_ok "Stopped Vaultwarden"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue