Skip to content

Commit b7a4ade

Browse files
authored
Merge pull request #2260 from owenvoke/feature/razzia
feat: add Razzia
2 parents 77d2b48 + 1d6bc6c commit b7a4ade

3 files changed

Lines changed: 216 additions & 0 deletions

File tree

‎ct/razzia.sh‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env bash
2+
# Engine comes from community-scripts/core; this repo only ships the scripts.
3+
# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core),
4+
# so a fork or branch of core can be tested without editing this file.
5+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
6+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
7+
# Copyright (c) 2021-2026 community-scripts ORG
8+
# Author: Owen Voke (owenvoke)
9+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
10+
# Source: https://github.com/Ralex91/Razzia
11+
12+
APP="Razzia"
13+
var_tags="${var_tags:-quiz;games}"
14+
var_cpu="${var_cpu:-2}"
15+
var_ram="${var_ram:-3072}"
16+
var_disk="${var_disk:-8}"
17+
var_os="${var_os:-debian}"
18+
var_version="${var_version:-13}"
19+
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
20+
var_unprivileged="${var_unprivileged:-1}"
21+
var_testurl="${var_testurl:-https://github.com/community-scripts/ProxmoxVED/issues/2248}"
22+
23+
header_info "$APP"
24+
variables
25+
color
26+
catch_errors
27+
28+
function update_script() {
29+
header_info
30+
check_container_storage
31+
check_container_resources
32+
33+
if [[ ! -d /opt/razzia ]]; then
34+
msg_error "No ${APP} Installation Found!"
35+
exit
36+
fi
37+
38+
if check_for_gh_release "razzia" "Ralex91/Razzia"; then
39+
msg_info "Stopping Service"
40+
systemctl stop razzia
41+
msg_ok "Stopped Service"
42+
43+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "razzia" "Ralex91/Razzia" "tarball"
44+
45+
NODE_VERSION="24" NODE_MODULE="pnpm@11" setup_nodejs
46+
47+
msg_info "Building Razzia"
48+
cd /opt/razzia
49+
$STD pnpm install --frozen-lockfile
50+
$STD pnpm build
51+
msg_ok "Built Razzia"
52+
53+
msg_info "Starting Service"
54+
systemctl start razzia
55+
msg_ok "Started Service"
56+
msg_ok "Updated successfully!"
57+
fi
58+
exit
59+
}
60+
61+
start
62+
build_container
63+
description
64+
65+
msg_ok "Completed Successfully!\n"
66+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
67+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
68+
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"

‎install/razzia-install.sh‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Owen Voke (owenvoke)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/Ralex91/Razzia
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt install -y nginx
18+
msg_ok "Installed Dependencies"
19+
20+
NODE_VERSION="24" NODE_MODULE="pnpm@11" setup_nodejs
21+
fetch_and_deploy_gh_release "razzia" "Ralex91/Razzia" "tarball"
22+
23+
msg_info "Building Razzia"
24+
cd /opt/razzia
25+
$STD pnpm install --frozen-lockfile
26+
$STD pnpm build
27+
msg_ok "Built Razzia"
28+
29+
msg_info "Configuring Razzia"
30+
mkdir -p /opt/razzia-config
31+
cat <<EOF >/opt/razzia-config/game.json
32+
{
33+
"managerPassword": "$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
34+
}
35+
EOF
36+
msg_ok "Configured Razzia"
37+
38+
msg_info "Creating Service"
39+
cat <<EOF >/etc/systemd/system/razzia.service
40+
[Unit]
41+
Description=Razzia Socket Server
42+
After=network.target
43+
44+
[Service]
45+
Type=simple
46+
User=root
47+
WorkingDirectory=/opt/razzia/packages/socket
48+
Environment=NODE_ENV=production
49+
Environment=CONFIG_PATH=/opt/razzia-config
50+
ExecStart=/usr/bin/node /opt/razzia/packages/socket/dist/index.cjs
51+
Restart=on-failure
52+
RestartSec=5
53+
54+
[Install]
55+
WantedBy=multi-user.target
56+
EOF
57+
systemctl enable -q --now razzia
58+
msg_ok "Created Service"
59+
60+
msg_info "Configuring Nginx"
61+
cat <<EOF >/etc/nginx/sites-available/razzia
62+
server {
63+
listen 3000;
64+
server_name _;
65+
66+
root /opt/razzia/packages/web/dist;
67+
index index.html;
68+
69+
location / {
70+
try_files \$uri \$uri/ /index.html;
71+
}
72+
73+
location /branding/ {
74+
alias /opt/razzia-config/branding/;
75+
}
76+
77+
location /ws {
78+
proxy_pass http://127.0.0.1:3001;
79+
proxy_http_version 1.1;
80+
proxy_set_header Upgrade \$http_upgrade;
81+
proxy_set_header Connection "upgrade";
82+
proxy_set_header Host \$host;
83+
proxy_set_header X-Real-IP \$remote_addr;
84+
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
85+
proxy_set_header X-Forwarded-Proto \$scheme;
86+
proxy_read_timeout 3600s;
87+
proxy_send_timeout 3600s;
88+
}
89+
}
90+
EOF
91+
nginx_enable_site razzia
92+
msg_ok "Configured Nginx"
93+
94+
motd_ssh
95+
customize
96+
cleanup_lxc

‎json/razzia.json‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "Razzia",
3+
"slug": "razzia",
4+
"categories": [
5+
24
6+
],
7+
"date_created": "2026-07-31",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://github.com/Ralex91/Razzia/blob/main/docs/README.md",
13+
"website": "https://github.com/Ralex91/Razzia",
14+
"repository": "https://github.com/Ralex91/Razzia",
15+
"architectures": [
16+
"amd64"
17+
],
18+
"logo": "https://cdn.jsdelivr.net/gh/Ralex91/Razzia@main/packages/web/public/icon.svg",
19+
"description": "Razzia is a self-hosted, open-source quiz platform for smaller events. A manager hosts a live quiz from the browser while participants join with a room code from their own devices, with quizzes, results and custom branding stored as files in the config folder.",
20+
"install_methods": [
21+
{
22+
"type": "default",
23+
"script": "ct/razzia.sh",
24+
"config_path": "/opt/razzia-config/game.json",
25+
"resources": {
26+
"cpu": 2,
27+
"ram": 3072,
28+
"hdd": 8,
29+
"os": "Debian",
30+
"version": "13"
31+
}
32+
}
33+
],
34+
"default_credentials": {
35+
"username": null,
36+
"password": null
37+
},
38+
"notes": [
39+
{
40+
"text": "The manager password is generated during installation and stored in /opt/razzia-config/game.json. Open the manager interface at http://<IP>:3000/manager and log in with it. Manager access stays blocked while managerPassword is the upstream default value \"PASSWORD\".",
41+
"type": "info"
42+
},
43+
{
44+
"text": "Quizzes, saved results and optional branding live in /opt/razzia-config (quizz/, results/, branding/). An example quiz is created there on first start. Restart the service after editing game.json: systemctl restart razzia",
45+
"type": "info"
46+
},
47+
{
48+
"text": "Game state is kept in memory by the socket server, so only run a single instance. Behind a reverse proxy, WebSocket upgrade headers must be forwarded to port 3000 or clients stay stuck on connecting.",
49+
"type": "warning"
50+
}
51+
]
52+
}

0 commit comments

Comments
 (0)