Skip to content

Commit 0b014d2

Browse files
authored
Homepage: Bugfix for v1.0.0 (#3092)
* (for revert)modify func files * KSS
1 parent 0a9eb50 commit 0b014d2

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

ct/homepage.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
88
APP="Homepage"
99
var_tags="dashboard"
1010
var_cpu="2"
11-
var_ram="1024"
12-
var_disk="3"
11+
var_ram="4096"
12+
var_disk="6"
1313
var_os="debian"
1414
var_version="12"
1515
var_unprivileged="1"
@@ -35,6 +35,7 @@ function update_script() {
3535
echo "Installed NPM..."
3636
fi
3737
fi
38+
LOCAL_IP=$(hostname -I | awk '{print $1}')
3839
RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3940
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
4041
msg_info "Updating Homepage to v${RELEASE} (Patience)"
@@ -49,7 +50,11 @@ function update_script() {
4950
$STD npx --yes update-browserslist-db@latest
5051
export NEXT_PUBLIC_VERSION="v$RELEASE"
5152
export NEXT_PUBLIC_REVISION="source"
53+
export NEXT_TELEMETRY_DISABLED=1
5254
$STD pnpm build
55+
if [[ ! -f /opt/homepage/.env ]]; then
56+
echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env
57+
fi
5358
systemctl start homepage
5459
echo "${RELEASE}" >/opt/${APP}_version.txt
5560
msg_ok "Updated Homepage to v${RELEASE}"

install/homepage-install.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ network_check
1414
update_os
1515

1616
msg_info "Installing Dependencies"
17-
$STD apt-get install -y curl
18-
$STD apt-get install -y sudo
19-
$STD apt-get install -y mc
20-
$STD apt-get install -y gpg
17+
$STD apt-get install -y curl \
18+
sudo \
19+
mc \
20+
gpg
2121
msg_ok "Installed Dependencies"
2222

2323
msg_info "Setting up Node.js Repository"
@@ -32,6 +32,7 @@ $STD apt-get install -y nodejs
3232
$STD npm install -g pnpm
3333
msg_ok "Installed Node.js"
3434

35+
LOCAL_IP=$(hostname -I | awk '{print $1}')
3536
RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3637
msg_info "Installing Homepage v${RELEASE} (Patience)"
3738
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
4546
$STD pnpm install
4647
export NEXT_PUBLIC_VERSION="v$RELEASE"
4748
export NEXT_PUBLIC_REVISION="source"
49+
export NEXT_TELEMETRY_DISABLED=1
4850
$STD pnpm build
51+
echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env
4952
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
5053
msg_ok "Installed Homepage v${RELEASE}"
5154

json/homepage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"script": "ct/homepage.sh",
2020
"resources": {
2121
"cpu": 2,
22-
"ram": 1024,
23-
"hdd": 3,
22+
"ram": 4096,
23+
"hdd": 6,
2424
"os": "debian",
2525
"version": "12"
2626
}
@@ -34,6 +34,10 @@
3434
{
3535
"text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`",
3636
"type": "info"
37+
},
38+
{
39+
"text": "Add additional allowed hosts to `/opt/homepage/.env`",
40+
"type": "info"
3741
}
3842
]
3943
}

0 commit comments

Comments
 (0)