From 386bb80e1e6995aef3781d52e10462d5c8be1dba Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 14:19:42 +0200 Subject: [PATCH] Add cinephage (ct) (#17852) Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> --- ct/cinephage.sh | 69 +++++++++++++++++++++++++++++ install/cinephage-install.sh | 84 ++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 ct/cinephage.sh create mode 100644 install/cinephage-install.sh diff --git a/ct/cinephage.sh b/ct/cinephage.sh new file mode 100644 index 000000000..95ca9275f --- /dev/null +++ b/ct/cinephage.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +_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/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/MoldyTaint/Cinephage + +APP="Cinephage" +var_tags="${var_tags:-arr;media;torrent;usenet}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" +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/cinephage ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "cinephage" "MoldyTaint/Cinephage"; then + msg_info "Stopping Cinephage" + systemctl stop cinephage + msg_ok "Stopped Cinephage" + + NODE_VERSION="24" setup_nodejs + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cinephage" "MoldyTaint/Cinephage" "tarball" + + msg_info "Building Cinephage" + cd /opt/cinephage + $STD npm ci + $STD npm run build + $STD npm prune --omit=dev + sed -i "s/^APP_VERSION=.*/APP_VERSION=$(cat ~/.cinephage)/" /opt/cinephage_data/.env + msg_ok "Built Cinephage" + + msg_info "Updating Camoufox" + $STD /opt/cinephage/node_modules/.bin/camoufox-js fetch + msg_ok "Updated Camoufox" + + msg_info "Starting Cinephage" + systemctl start cinephage + msg_ok "Started Cinephage" + msg_ok "Updated successfully!" + 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}:3000${CL}" diff --git a/install/cinephage-install.sh b/install/cinephage-install.sh new file mode 100644 index 000000000..1c23e1efd --- /dev/null +++ b/install/cinephage-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/MoldyTaint/Cinephage + +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 \ + build-essential \ + python3 \ + libasound2t64 \ + libgtk-3-0t64 \ + libx11-xcb1 \ + xvfb +msg_ok "Installed Dependencies" + +setup_ffmpeg +NODE_VERSION="24" setup_nodejs +fetch_and_deploy_gh_release "cinephage" "MoldyTaint/Cinephage" "tarball" + +msg_info "Building Cinephage" +cd /opt/cinephage +$STD npm ci +$STD npm run build +$STD npm prune --omit=dev +msg_ok "Built Cinephage" + +msg_info "Installing Camoufox" +$STD /opt/cinephage/node_modules/.bin/camoufox-js fetch +msg_ok "Installed Camoufox" + +msg_info "Configuring Cinephage" +mkdir -p /opt/cinephage_data/indexers/custom /opt/cinephage_data/external-lists/custom +cat </opt/cinephage_data/.env +NODE_ENV=production +HOST=0.0.0.0 +PORT=3000 +APP_VERSION=$(cat ~/.cinephage) +BETTER_AUTH_SECRET=$(openssl rand -base64 32) +DATA_DIR=/opt/cinephage_data +INDEXER_DEFINITIONS_PATH=/opt/cinephage/data/indexers/definitions +INDEXER_CUSTOM_DEFINITIONS_PATH=/opt/cinephage_data/indexers/custom +EXTERNAL_LISTS_PRESETS_PATH=/opt/cinephage/data/external-lists/presets +EXTERNAL_LISTS_CUSTOM_PRESETS_PATH=/opt/cinephage_data/external-lists/custom +CAPTCHA_ADDON_PATH=/opt/cinephage/src/lib/server/captcha/browser/addon +FFPROBE_PATH=/usr/bin/ffprobe +EOF +chmod 600 /opt/cinephage_data/.env +msg_ok "Configured Cinephage" + +msg_info "Creating Service" +cat </etc/systemd/system/cinephage.service +[Unit] +Description=Cinephage +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/cinephage +EnvironmentFile=/opt/cinephage_data/.env +Environment=NODE_OPTIONS=--max-old-space-size=2048 +ExecStart=/usr/bin/node server.js +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now cinephage +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc