diff --git a/ct/pricebuddy.sh b/ct/pricebuddy.sh deleted file mode 100644 index 546f3d83db..0000000000 --- a/ct/pricebuddy.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" -_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" -source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://github.com/jez500/pricebuddy - -APP="PriceBuddy" -var_tags="${var_tags:-shopping;price-tracker}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-3072}" -var_disk="${var_disk:-10}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_arm64="${var_arm64:-no}" # the bundled scraper runs Google Chrome, which is amd64-only -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/pricebuddy ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "pricebuddy" "jez500/pricebuddy"; then - msg_info "Stopping PriceBuddy Worker" - systemctl stop pricebuddy-worker - msg_ok "Stopped PriceBuddy Worker" - - setup_composer - NODE_VERSION="22" setup_nodejs - - create_backup /opt/pricebuddy/.env /opt/pricebuddy/storage - - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pricebuddy" "jez500/pricebuddy" "tarball" - - restore_backup - - msg_info "Updating PriceBuddy" - cd /opt/pricebuddy - sed -i "s/^APP_VERSION=.*/APP_VERSION=$(cat ~/.pricebuddy)/" .env - $STD composer install --no-dev --optimize-autoloader --no-interaction - $STD npm install - $STD npm run build - $STD php artisan storage:link - $STD php artisan migrate --force - $STD php artisan optimize - $STD php artisan icons:cache - $STD php artisan buddy:regenerate-price-cache - chown -R www-data:www-data /opt/pricebuddy - msg_ok "Updated PriceBuddy" - - msg_info "Starting PriceBuddy Worker" - systemctl start pricebuddy-worker - msg_ok "Started PriceBuddy Worker" - msg_ok "Updated successfully!" - fi - - if check_for_gh_release "seleniumbase-scrapper" "jez500/seleniumbase-scrapper"; then - msg_info "Stopping SeleniumBase Scrapper" - systemctl stop seleniumbase-scrapper - msg_ok "Stopped SeleniumBase Scrapper" - - msg_info "Updating Google Chrome" - apt_update_safe - upgrade_packages_with_retry google-chrome-stable - msg_ok "Updated Google Chrome" - - PYTHON_VERSION="3.12" setup_uv - - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "seleniumbase-scrapper" "jez500/seleniumbase-scrapper" "tarball" - - msg_info "Updating SeleniumBase Scrapper" - $STD uv venv --python 3.12 /opt/seleniumbase-scrapper/.venv - $STD uv pip install --python /opt/seleniumbase-scrapper/.venv/bin/python \ - "seleniumbase==$(sed -n 's/^ARG SELENIUMBASE_VERSION=v//p' /opt/seleniumbase-scrapper/Dockerfile)" \ - flask \ - beautifulsoup4 - $STD /opt/seleniumbase-scrapper/.venv/bin/seleniumbase get chromedriver - msg_ok "Updated SeleniumBase Scrapper" - - msg_info "Starting SeleniumBase Scrapper" - systemctl start seleniumbase-scrapper - msg_ok "Started SeleniumBase Scrapper" - fi - exit -} - -start -build_container -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 "${GATEWAY}${BGN}http://${IP}${CL}" -echo -e "${INFO}${YW}Log in as admin@example.com - the password is APP_USER_PASSWORD in /opt/pricebuddy/.env${CL}" diff --git a/install/pricebuddy-install.sh b/install/pricebuddy-install.sh deleted file mode 100644 index 9e1f425e42..0000000000 --- a/install/pricebuddy-install.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://github.com/jez500/pricebuddy - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apt install -y \ - nginx \ - cron \ - xvfb -msg_ok "Installed Dependencies" - -PHP_VERSION="8.4" PHP_FPM="YES" PHP_MEMORY_LIMIT="2048M" setup_php -setup_composer -NODE_VERSION="22" setup_nodejs -setup_mariadb -MARIADB_DB_NAME="pricebuddy" MARIADB_DB_USER="pricebuddy" setup_mariadb_db -PYTHON_VERSION="3.12" setup_uv - -msg_info "Installing Google Chrome" -setup_deb822_repo \ - "google-chrome" \ - "https://dl.google.com/linux/linux_signing_key.pub" \ - "https://dl.google.com/linux/chrome/deb/" \ - "stable" -$STD apt install -y google-chrome-stable -# the package adds its own .list for the same repo, which apt rejects next to the deb822 source -rm -f /etc/apt/sources.list.d/google-chrome.list -msg_ok "Installed Google Chrome" - -fetch_and_deploy_gh_release "seleniumbase-scrapper" "jez500/seleniumbase-scrapper" "tarball" - -msg_info "Setting up SeleniumBase Scrapper" -$STD uv venv --python 3.12 /opt/seleniumbase-scrapper/.venv -# the SeleniumBase release upstream builds and tests its image against -$STD uv pip install --python /opt/seleniumbase-scrapper/.venv/bin/python \ - "seleniumbase==$(sed -n 's/^ARG SELENIUMBASE_VERSION=v//p' /opt/seleniumbase-scrapper/Dockerfile)" \ - flask \ - beautifulsoup4 -$STD /opt/seleniumbase-scrapper/.venv/bin/seleniumbase get chromedriver -msg_ok "Set up SeleniumBase Scrapper" - -fetch_and_deploy_gh_release "pricebuddy" "jez500/pricebuddy" "tarball" - -msg_info "Setting up PriceBuddy" -cd /opt/pricebuddy -cat </opt/pricebuddy/.env -APP_NAME=PriceBuddy -APP_ENV=production -APP_KEY=base64:$(openssl rand -base64 32) -APP_DEBUG=false -APP_URL=http://${LOCAL_IP} -APP_VERSION=$(cat ~/.pricebuddy) - -DB_CONNECTION=mariadb -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=pricebuddy -DB_USERNAME=pricebuddy -DB_PASSWORD=${MARIADB_DB_PASS} - -SCRAPER_BASE_URL=http://127.0.0.1:3000 - -APP_USER_EMAIL=admin@example.com -APP_USER_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) -EOF -$STD composer install --no-dev --optimize-autoloader --no-interaction -$STD npm install -$STD npm run build -$STD php artisan storage:link -# reads APP_USER_* for the admin via env(), so it has to run before optimize caches the config -$STD php artisan buddy:init-db -$STD php artisan optimize -$STD php artisan icons:cache -chown -R www-data:www-data /opt/pricebuddy -chmod 600 /opt/pricebuddy/.env -msg_ok "Set up PriceBuddy" - -msg_info "Configuring Nginx" -PHP_SOCK=$(get_php_fpm_socket) -cat </etc/nginx/sites-available/pricebuddy -server { - listen 80; - server_name _; - root /opt/pricebuddy/public; - - index index.php; - charset utf-8; - - location / { - try_files \$uri \$uri/ /index.php?\$query_string; - } - - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } - - error_page 404 /index.php; - - location ~ \.php\$ { - fastcgi_pass unix:${PHP_SOCK}; - fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; - include fastcgi_params; - fastcgi_read_timeout 300; - } - - location ~ /\.(?!well-known).* { - deny all; - } -} -EOF -nginx_enable_site "pricebuddy" -msg_ok "Configured Nginx" - -msg_info "Creating Services" -cat </etc/systemd/system/seleniumbase-scrapper.service -[Unit] -Description=SeleniumBase Scrapper for PriceBuddy -After=network.target - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/seleniumbase-scrapper/api -Environment=API_HOST=127.0.0.1 -Environment=API_PORT=3000 -ExecStart=/opt/seleniumbase-scrapper/.venv/bin/python /opt/seleniumbase-scrapper/api/server.py -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -cat </etc/systemd/system/pricebuddy-worker.service -[Unit] -Description=PriceBuddy Queue Worker -After=network.target mariadb.service - -[Service] -Type=simple -User=www-data -Group=www-data -WorkingDirectory=/opt/pricebuddy -ExecStart=/usr/bin/php /opt/pricebuddy/artisan queue:work -Restart=always -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -cat </etc/cron.d/pricebuddy -* * * * * www-data cd /opt/pricebuddy && php artisan schedule:run >/dev/null 2>&1 -EOF -systemctl enable -q --now seleniumbase-scrapper pricebuddy-worker -msg_ok "Created Services" - -motd_ssh -customize -cleanup_lxc diff --git a/json/pricebuddy.json b/json/pricebuddy.json deleted file mode 100644 index 75fb5f44c4..0000000000 --- a/json/pricebuddy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "PriceBuddy", - "slug": "pricebuddy", - "categories": [ - 23 - ], - "date_created": "2026-09-27", - "type": "ct", - "updateable": true, - "privileged": false, - "architectures": [ - "amd64" - ], - "interface_port": 80, - "documentation": "https://pricebuddy.jez.me/", - "website": "https://pricebuddy.jez.me/", - "repository": "https://github.com/jez500/pricebuddy", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/pricebuddy.webp", - "description": "PriceBuddy is a self-hosted price tracker. Paste a product URL from almost any store and it checks price and stock on a schedule, keeps the price history, compares the same product across retailers, and notifies you by email, Pushover, Gotify, ntfy, Telegram, Discord or Apprise when a deal moves in your favour.", - "install_methods": [ - { - "type": "default", - "script": "ct/pricebuddy.sh", - "config_path": "/opt/pricebuddy/.env", - "resources": { - "cpu": 2, - "ram": 3072, - "hdd": 10, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": "admin@example.com", - "password": null - }, - "notes": [ - { - "text": "The admin password is generated at install and stored as APP_USER_PASSWORD in /opt/pricebuddy/.env. Log in with admin@example.com, then change the email and password under Account settings.", - "type": "warning" - }, - { - "text": "Stores set to the API (browser) scraper service are rendered by the bundled SeleniumBase Scrapper, a headless Google Chrome on 127.0.0.1:3000 (service seleniumbase-scrapper). The default HTTP scraper does not use it.", - "type": "info" - }, - { - "text": "The configuration is cached. After editing /opt/pricebuddy/.env (for example APP_URL and ASSET_URL behind a reverse proxy), run 'php artisan config:cache' in /opt/pricebuddy and restart pricebuddy-worker.", - "type": "info" - } - ] -}