Update Hoodik build scripts and requirements

Increase default RAM to 4GB and disk to 20GB for Hoodik builds in scripts and metadata. Split frontend and backend build steps, add frontend build commands, and clean up build artifacts after installation. Update installation instructions and warnings to reflect new requirements and build times. Change default URLs to use HTTP instead of HTTPS and adjust systemd service working directory.
This commit is contained in:
CanbiZ 2025-12-10 07:52:51 +01:00
parent 7373ecfc32
commit 66c7b2e168
4 changed files with 44 additions and 14 deletions

View File

@ -8,8 +8,8 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="Hoodik" APP="Hoodik"
var_tags="${var_tags:-cloud;storage}" var_tags="${var_tags:-cloud;storage}"
var_cpu="${var_cpu:-4}" var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-4096}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-20}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
@ -38,11 +38,19 @@ function update_script() {
cp /opt/hoodik/.env /tmp/hoodik.env.bak cp /opt/hoodik/.env /tmp/hoodik.env.bak
msg_ok "Backed up Configuration" msg_ok "Backed up Configuration"
msg_info "Updating ${APP} (Patience - this takes 10-15 minutes)" msg_info "Updating ${APP} (Patience - this takes 15-20 minutes)"
source ~/.cargo/env source ~/.cargo/env
rm -rf /opt/hoodik rm -rf /opt/hoodik
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik" fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik"
cd /opt/hoodik cd /opt/hoodik
msg_info "Building Frontend"
$STD yarn install --frozen-lockfile
$STD yarn wasm-pack
$STD yarn web:build
msg_ok "Built Frontend"
msg_info "Building Backend"
$STD cargo build --release $STD cargo build --release
cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik
chmod +x /usr/local/bin/hoodik chmod +x /usr/local/bin/hoodik
@ -55,6 +63,8 @@ function update_script() {
msg_info "Cleaning Up" msg_info "Cleaning Up"
rm -rf /opt/hoodik/target rm -rf /opt/hoodik/target
rm -rf /root/.cargo/registry
rm -rf /opt/hoodik/node_modules
msg_ok "Cleaned" msg_ok "Cleaned"
msg_info "Starting Services" msg_info "Starting Services"
@ -73,4 +83,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:5443${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5443${CL}"

View File

@ -20,8 +20,8 @@
"script": "ct/hoodik.sh", "script": "ct/hoodik.sh",
"resources": { "resources": {
"cpu": 4, "cpu": 4,
"ram": 2048, "ram": 4096,
"hdd": 8, "hdd": 20,
"os": "Debian", "os": "Debian",
"version": "13" "version": "13"
} }
@ -37,7 +37,11 @@
"type": "info" "type": "info"
}, },
{ {
"text": "Installation builds from source and takes 10-15 minutes", "text": "Installation builds Rust backend and Vue frontend from source - takes 15-20 minutes",
"type": "warning"
},
{
"text": "Requires 4GB RAM and 20GB disk for build process",
"type": "warning" "type": "warning"
}, },
{ {

View File

@ -27,16 +27,32 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
setup_rust setup_rust
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik" fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik"
msg_info "Building Hoodik" msg_info "Installing wasm-pack"
$STD cargo install wasm-pack
msg_ok "Installed wasm-pack"
msg_info "Building Hoodik Frontend"
cd /opt/hoodik
$STD yarn install --frozen-lockfile
$STD yarn wasm-pack
$STD yarn web:build
msg_ok "Built Hoodik Frontend"
msg_info "Building Hoodik Backend"
cd /opt/hoodik cd /opt/hoodik
source ~/.cargo/env
$STD cargo build --release $STD cargo build --release
cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik
chmod +x /usr/local/bin/hoodik chmod +x /usr/local/bin/hoodik
msg_ok "Built Hoodik Backend"
msg_info "Cleaning up build artifacts"
rm -rf /opt/hoodik/target rm -rf /opt/hoodik/target
msg_ok "Built Hoodik" rm -rf /root/.cargo/registry
rm -rf /opt/hoodik/node_modules
msg_ok "Cleaned up build artifacts"
msg_info "Configuring Hoodik" msg_info "Configuring Hoodik"
mkdir -p /opt/hoodik_data mkdir -p /opt/hoodik_data
@ -46,7 +62,7 @@ DATA_DIR=/opt/hoodik_data
HTTP_PORT=5443 HTTP_PORT=5443
HTTP_ADDRESS=0.0.0.0 HTTP_ADDRESS=0.0.0.0
JWT_SECRET=${JWT_SECRET} JWT_SECRET=${JWT_SECRET}
APP_URL=https://localhost:5443 APP_URL=http://127.0.0.1:5443
SSL_DISABLED=true SSL_DISABLED=true
MAILER_TYPE=none MAILER_TYPE=none
RUST_LOG=hoodik=info,error=info RUST_LOG=hoodik=info,error=info
@ -62,9 +78,9 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
User=root User=root
WorkingDirectory=/opt/hoodik WorkingDirectory=/opt/hoodik_data
EnvironmentFile=/opt/hoodik/.env EnvironmentFile=/opt/hoodik/.env
ExecStart=/usr/local/bin/hoodik -a 0.0.0.0 -p 5443 ExecStart=/usr/local/bin/hoodik
Restart=always Restart=always
RestartSec=5 RestartSec=5

View File

@ -2854,7 +2854,7 @@ build_container() {
# Skip directories like /dev/nvidia-caps (they need special handling) # Skip directories like /dev/nvidia-caps (they need special handling)
for d in /dev/nvidia*; do for d in /dev/nvidia*; do
[[ -e "$d" ]] || continue [[ -e "$d" ]] || continue
[[ -d "$d" ]] && continue # Skip directories [[ -d "$d" ]] && continue # Skip directories
NVIDIA_DEVICES+=("$d") NVIDIA_DEVICES+=("$d")
done done