From b3df8b8b8fe2a0dcbb665a4a17815bf7a23a7296 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, 1 Nov 2026 21:18:19 +0100 Subject: [PATCH] Razzia (#18366) * Add razzia (ct) * arm64 --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> --- ct/razzia.sh | 68 ++++++++++++++++++++++ install/razzia-install.sh | 118 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 ct/razzia.sh create mode 100644 install/razzia-install.sh diff --git a/ct/razzia.sh b/ct/razzia.sh new file mode 100644 index 000000000..0778042c2 --- /dev/null +++ b/ct/razzia.sh @@ -0,0 +1,68 @@ +#!/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: Owen Voke (owenvoke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Ralex91/Razzia + +APP="Razzia" +var_tags="${var_tags:-quiz;games}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-3072}" +var_disk="${var_disk:-8}" +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/razzia ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "razzia" "Ralex91/Razzia"; then + msg_info "Stopping Service" + systemctl stop razzia + msg_ok "Stopped Service" + + create_backup /opt/razzia/.env + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "razzia" "Ralex91/Razzia" "tarball" + + restore_backup + + NODE_VERSION="24" NODE_MODULE="pnpm@11" setup_nodejs + + msg_info "Building Razzia" + cd /opt/razzia + $STD pnpm install --frozen-lockfile + $STD pnpm build + msg_ok "Built Razzia" + + msg_info "Starting Service" + systemctl start razzia + msg_ok "Started Service" + 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/razzia-install.sh b/install/razzia-install.sh new file mode 100644 index 000000000..342ea1c5f --- /dev/null +++ b/install/razzia-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Owen Voke (owenvoke) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Ralex91/Razzia + +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 +msg_ok "Installed Dependencies" + +NODE_VERSION="24" NODE_MODULE="pnpm@11" setup_nodejs +fetch_and_deploy_gh_release "razzia" "Ralex91/Razzia" "tarball" + +msg_info "Building Razzia" +cd /opt/razzia +$STD pnpm install --frozen-lockfile +$STD pnpm build +msg_ok "Built Razzia" + +msg_info "Configuring Razzia" +mkdir -p /opt/razzia-config +cat </opt/razzia/.env +MANAGER_PASSWORD=$(random_password 16) +JWT_SECRET=$(openssl rand -hex 32) +EOF +msg_ok "Configured Razzia" + +msg_info "Creating Service" +cat </etc/systemd/system/razzia.service +[Unit] +Description=Razzia Socket Server +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/razzia/packages/socket +EnvironmentFile=/opt/razzia/.env +Environment=NODE_ENV=production +Environment=CONFIG_PATH=/opt/razzia-config +ExecStart=/usr/bin/node /opt/razzia/packages/socket/dist/index.cjs +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now razzia +msg_ok "Created Service" + +msg_info "Configuring Nginx" +cat </etc/nginx/sites-available/razzia +server { + listen 3000; + server_name _; + + root /opt/razzia/packages/web/dist; + index index.html; + + location / { + try_files \$uri \$uri/ /index.html; + } + + location /branding/ { + alias /opt/razzia-config/branding/; + } + + location /media/ { + alias /opt/razzia-config/media/; + types { + image/png png; + image/jpeg jpg; + image/webp webp; + image/gif gif; + audio/mpeg mp3; + audio/ogg ogg; + audio/wav wav; + video/mp4 mp4; + video/webm webm; + } + default_type application/octet-stream; + add_header X-Content-Type-Options nosniff; + } + + location /api { + client_max_body_size 101m; + proxy_pass http://127.0.0.1:3001; + proxy_set_header Host \$host; + proxy_read_timeout 300s; + proxy_send_timeout 300s; + } + + location /ws { + proxy_pass http://127.0.0.1:3001; + proxy_http_version 1.1; + proxy_set_header Upgrade \$http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host \$host; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + } +} +EOF +nginx_enable_site razzia +msg_ok "Configured Nginx" + +motd_ssh +customize +cleanup_lxc