From 0b014d25be308080665bea744b400e32f237473a Mon Sep 17 00:00:00 2001 From: Chris <67816022+vhsdream@users.noreply.github.com> Date: Sat, 15 Mar 2025 04:06:20 -0400 Subject: [PATCH] Homepage: Bugfix for v1.0.0 (#3092) * (for revert)modify func files * KSS --- ct/homepage.sh | 9 +++++++-- install/homepage-install.sh | 11 +++++++---- json/homepage.json | 8 ++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ct/homepage.sh b/ct/homepage.sh index 56e587f74..487b8abbd 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m APP="Homepage" var_tags="dashboard" var_cpu="2" -var_ram="1024" -var_disk="3" +var_ram="4096" +var_disk="6" var_os="debian" var_version="12" var_unprivileged="1" @@ -35,6 +35,7 @@ function update_script() { echo "Installed NPM..." fi fi + LOCAL_IP=$(hostname -I | awk '{print $1}') RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Updating Homepage to v${RELEASE} (Patience)" @@ -49,7 +50,11 @@ function update_script() { $STD npx --yes update-browserslist-db@latest export NEXT_PUBLIC_VERSION="v$RELEASE" export NEXT_PUBLIC_REVISION="source" + export NEXT_TELEMETRY_DISABLED=1 $STD pnpm build + if [[ ! -f /opt/homepage/.env ]]; then + echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env + fi systemctl start homepage echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Homepage to v${RELEASE}" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index b0e086e12..02f3c5f4a 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -14,10 +14,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gpg +$STD apt-get install -y curl \ + sudo \ + mc \ + gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -32,6 +32,7 @@ $STD apt-get install -y nodejs $STD npm install -g pnpm msg_ok "Installed Node.js" +LOCAL_IP=$(hostname -I | awk '{print $1}') RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Homepage v${RELEASE} (Patience)" wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz @@ -45,7 +46,9 @@ cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install export NEXT_PUBLIC_VERSION="v$RELEASE" export NEXT_PUBLIC_REVISION="source" +export NEXT_TELEMETRY_DISABLED=1 $STD pnpm build +echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Homepage v${RELEASE}" diff --git a/json/homepage.json b/json/homepage.json index 04ddc3a8d..30002b3de 100644 --- a/json/homepage.json +++ b/json/homepage.json @@ -19,8 +19,8 @@ "script": "ct/homepage.sh", "resources": { "cpu": 2, - "ram": 1024, - "hdd": 3, + "ram": 4096, + "hdd": 6, "os": "debian", "version": "12" } @@ -34,6 +34,10 @@ { "text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`", "type": "info" + }, + { + "text": "Add additional allowed hosts to `/opt/homepage/.env`", + "type": "info" } ] }