Homepage v2.0 (#16500)

This commit is contained in:
Chris
2026-08-14 16:08:21 -04:00
committed by GitHub
parent d247079e89
commit b2997c15ed
2 changed files with 41 additions and 5 deletions
+24 -3
View File
@@ -39,15 +39,15 @@ function update_script() {
create_backup /opt/homepage/.env /opt/homepage/config
BACKUP_DIR=/opt/homepage-assets.backup create_backup /opt/homepage/public/images /opt/homepage/public/icons
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball"
restore_backup
msg_info "Updating Homepage (Patience)"
RELEASE=$(get_latest_github_release "gethomepage/homepage")
cd /opt/homepage
echo 'onlyBuiltDependencies=*' >> .npmrc
echo 'onlyBuiltDependencies=*' >>.npmrc
$STD pnpm install
$STD pnpm update --no-save caniuse-lite
export NEXT_PUBLIC_VERSION="v$RELEASE"
@@ -56,6 +56,27 @@ function update_script() {
export NEXT_TELEMETRY_DISABLED=1
$STD pnpm build
BACKUP_DIR=/opt/homepage-assets.backup restore_backup
if ! grep -q 'AUTH' /opt/homepage/.env; then
msg_info "Updating .env"
cp /opt/homepage/.env /opt/homepage/env.bak
cat <<EOF >>/opt/homepage/.env
## Optional Authentication
# HOMEPAGE_AUTH_ENABLED=true
# HOMEPAGE_AUTH_SECRET="$(openssl rand -base64 32)"
# HOMEPAGE_EXTERNAL_URL=<your-external-url>
## Uncomment below and use strong, unique password for password login
# HOMEPAGE_AUTH_PASSWORD=
## Uncomment and fill in below for OIDC login
# HOMEPAGE_OIDC_ISSUER=
# HOMEPAGE_OIDC_CLIENT_ID=
# HOMEPAGE_OIDC_CLIENT_SECRET=
# HOMEPAGE_OIDC_SCOPE=openid email profile
# HOMEPAGE_OIDC_NAME=
EOF
msg_ok "Updated .env"
rm /opt/homepage/env.bak
chmod 600 /opt/homepage/.env
fi
msg_ok "Updated Homepage"
msg_info "Starting service"
+17 -2
View File
@@ -25,14 +25,29 @@ msg_info "Installing Homepage (Patience)"
mkdir -p /opt/homepage/config
cd /opt/homepage
cp /opt/homepage/src/skeleton/* /opt/homepage/config
echo 'onlyBuiltDependencies=*' >> .npmrc
echo 'onlyBuiltDependencies=*' >>.npmrc
$STD pnpm install
export NEXT_PUBLIC_VERSION="v$RELEASE"
export NEXT_PUBLIC_REVISION="source"
export NEXT_PUBLIC_BUILDTIME=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.published_at')
export NEXT_TELEMETRY_DISABLED=1
$STD pnpm build
echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" >/opt/homepage/.env
cat <<EOF >/opt/homepage/.env
HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000
## Optional Authentication
# HOMEPAGE_AUTH_ENABLED=true
# HOMEPAGE_AUTH_SECRET="$(openssl rand -base64 32)"
# HOMEPAGE_EXTERNAL_URL=<your-external-url>
## Uncomment below and use strong, unique password for password login
# HOMEPAGE_AUTH_PASSWORD=
## Uncomment and fill in below for OIDC login
# HOMEPAGE_OIDC_ISSUER=
# HOMEPAGE_OIDC_CLIENT_ID=
# HOMEPAGE_OIDC_CLIENT_SECRET=
# HOMEPAGE_OIDC_SCOPE=openid email profile
# HOMEPAGE_OIDC_NAME=
EOF
chmod 600 /opt/homepage/.env
msg_ok "Installed Homepage"
msg_info "Creating Service"