implement review suggestions by @CrazyWolf13

This commit is contained in:
Marc Went 2025-12-30 15:46:38 +01:00
parent f948688dda
commit 03e2c20963
No known key found for this signature in database
GPG Key ID: EA4208DC5ABEB135
4 changed files with 26 additions and 25 deletions

View File

@ -1,6 +0,0 @@
_ ___ __ ___ __
| | / (_)____/ /_ / (_)____/ /_
| | /| / / / ___/ __ \/ / / ___/ __/
| |/ |/ / (__ ) / / / / (__ ) /_
|__/|__/_/____/_/ /_/_/_/____/\__/

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) source <(curl -fsSL https://raw.githubusercontent.com/Dunky13/ProxmoxVE/refs/heads/feature/wishlist/misc/build.func)
# Copyright (c) 2021-2025 tteck # Copyright (c) 2021-2025 tteck
# Author: Dunky13 # Author: Dunky13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -27,34 +27,33 @@ function update_script() {
exit exit
fi fi
if check_for_gh_release "wishlist" "cmintey/wishlist"; then
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
if check_for_gh_release "wishlist" "cmintey/wishlist"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop wishlist systemctl stop wishlist
msg_ok "Service Stopped" msg_ok "Stopped Service"
cp /opt/wishlist/.env /opt/ cp /opt/wishlist/.env /opt/wishlist.env
cp -R /opt/wishlist/uploads /opt/ cp -R /opt/wishlist/uploads /opt/
cp -R /opt/wishlist/data /opt/ cp -R /opt/wishlist/data /opt/
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wishlist" "cmintey/wishlist" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wishlist" "cmintey/wishlist" "tarball"
LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist") LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist")
msg_info "Updating ${APP}" msg_info "Updating ${APP}"
cd /opt/wishlist || exit cd /opt/wishlist
$STD pnpm install $STD pnpm install
$STD pnpm svelte-kit sync $STD pnpm svelte-kit sync
$STD pnpm prisma generate $STD pnpm prisma generate
$STD sed -i 's|/usr/src/app/|/opt/wishlist/|g' $(grep -rl '/usr/src/app/' /opt/wishlist) sed -i 's|/usr/src/app/|/opt/wishlist/|g' $(grep -rl '/usr/src/app/' /opt/wishlist)
export VERSION="${LATEST_APP_VERSION}" export VERSION="${LATEST_APP_VERSION}"
export SHA="${LATEST_APP_VERSION}" export SHA="${LATEST_APP_VERSION}"
$STD pnpm run build $STD pnpm run build
$STD pnpm prune --prod $STD pnpm prune --prod
$STD chmod +x /opt/wishlist/entrypoint.sh chmod +x /opt/wishlist/entrypoint.sh
mv /opt/.env /opt/wishlist/.env mv /opt/wishlist.env /opt/wishlist/.env
mv /opt/uploads /opt/wishlist/uploads mv /opt/uploads /opt/wishlist/uploads
mv /opt/data /opt/wishlist/data mv /opt/data /opt/wishlist/data

View File

@ -7,10 +7,10 @@
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 3280, "interface_port": 3280,
"documentation": null, "documentation": "https://github.com/cmintey/wishlist/blob/main/README.md#getting-started",
"config_path": "/opt/wishlist/.env", "config_path": "/opt/wishlist/.env",
"website": "https://github.com/cmintey/wishlist", "website": "https://github.com/cmintey/wishlist",
"logo": "https://github.com/cmintey/wishlist/blob/main/static/android-chrome-512x512.png?raw=true", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/png/cmintey-wishlist.png",
"description": "Wishlist is a self-hosted wishlist application that you can share with your friends and family. You no longer have to wonder what to get your family for the holidays, simply check their wishlist and claim any available item!", "description": "Wishlist is a self-hosted wishlist application that you can share with your friends and family. You no longer have to wonder what to get your family for the holidays, simply check their wishlist and claim any available item!",
"install_methods": [ "install_methods": [
{ {
@ -29,5 +29,10 @@
"username": null, "username": null,
"password": null "password": null
}, },
"notes": [] "notes": [
{
"text": "Edit /opt/wishlist/.env in the LXC container to customize settings. Restart the container after making changes.",
"type": "info"
}
]
} }

View File

@ -22,7 +22,8 @@ fetch_and_deploy_gh_release "wishlist" "cmintey/wishlist" "tarball"
LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist") LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist")
msg_info "Installing Wishlist" msg_info "Installing Wishlist"
cd /opt/wishlist || exit cd /opt/wishlist
cat <<EOF >/opt/wishlist/.env cat <<EOF >/opt/wishlist/.env
NODE_ENV=production NODE_ENV=production
BODY_SIZE_LIMIT=5000000 BODY_SIZE_LIMIT=5000000
@ -31,19 +32,21 @@ cat <<EOF >/opt/wishlist/.env
DEFAULT_CURRENCY=EUR DEFAULT_CURRENCY=EUR
MAX_IMAGE_SIZE=5000000 # 5 megabytes MAX_IMAGE_SIZE=5000000 # 5 megabytes
EOF EOF
$STD pnpm install $STD pnpm install
$STD pnpm svelte-kit sync $STD pnpm svelte-kit sync
$STD pnpm prisma generate $STD pnpm prisma generate
$STD sed -i 's|/usr/src/app/|/opt/wishlist/|g' $(grep -rl '/usr/src/app/' /opt/wishlist) sed -i 's|/usr/src/app/|/opt/wishlist/|g' $(grep -rl '/usr/src/app/' /opt/wishlist)
export VERSION="${LATEST_APP_VERSION}" export VERSION="${LATEST_APP_VERSION}"
export SHA="${LATEST_APP_VERSION}" export SHA="${LATEST_APP_VERSION}"
$STD pnpm run build $STD pnpm run build
$STD pnpm prune --prod $STD pnpm prune --prod
$STD chmod +x /opt/wishlist/entrypoint.sh chmod +x /opt/wishlist/entrypoint.sh
msg_ok "Installed Wishlist"
mkdir -p /opt/wishlist/uploads mkdir -p /opt/wishlist/uploads
mkdir -p /opt/wishlist/data mkdir -p /opt/wishlist/data
msg_ok "Installed Wishlist"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/wishlist.service cat <<EOF >/etc/systemd/system/wishlist.service