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"
var_tags="${var_tags:-cloud;storage}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
@ -38,11 +38,19 @@ function update_script() {
cp /opt/hoodik/.env /tmp/hoodik.env.bak
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
rm -rf /opt/hoodik
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/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
cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik
chmod +x /usr/local/bin/hoodik
@ -55,6 +63,8 @@ function update_script() {
msg_info "Cleaning Up"
rm -rf /opt/hoodik/target
rm -rf /root/.cargo/registry
rm -rf /opt/hoodik/node_modules
msg_ok "Cleaned"
msg_info "Starting Services"
@ -73,4 +83,4 @@ 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}https://${IP}:5443${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5443${CL}"

View File

@ -20,8 +20,8 @@
"script": "ct/hoodik.sh",
"resources": {
"cpu": 4,
"ram": 2048,
"hdd": 8,
"ram": 4096,
"hdd": 20,
"os": "Debian",
"version": "13"
}
@ -37,7 +37,11 @@
"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"
},
{

View File

@ -27,16 +27,32 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
setup_rust
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
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
source ~/.cargo/env
$STD cargo build --release
cp /opt/hoodik/target/release/hoodik /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
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"
mkdir -p /opt/hoodik_data
@ -46,7 +62,7 @@ DATA_DIR=/opt/hoodik_data
HTTP_PORT=5443
HTTP_ADDRESS=0.0.0.0
JWT_SECRET=${JWT_SECRET}
APP_URL=https://localhost:5443
APP_URL=http://127.0.0.1:5443
SSL_DISABLED=true
MAILER_TYPE=none
RUST_LOG=hoodik=info,error=info
@ -62,9 +78,9 @@ After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/hoodik
WorkingDirectory=/opt/hoodik_data
EnvironmentFile=/opt/hoodik/.env
ExecStart=/usr/local/bin/hoodik -a 0.0.0.0 -p 5443
ExecStart=/usr/local/bin/hoodik
Restart=always
RestartSec=5