Skip to content

Commit abdbca5

Browse files
push-app-to-main[bot]tremor021MickLesk
authored
Dispatcharr (#8658)
* 'Add new script' * Update dispatcharr.sh * Apply suggestion from @tremor021 * Update install/dispatcharr-install.sh Co-authored-by: Slaviša Arežina <[email protected]> * Update install/dispatcharr-install.sh Co-authored-by: Slaviša Arežina <[email protected]> * Update install/dispatcharr-install.sh Co-authored-by: Slaviša Arežina <[email protected]> * Update author information in dispatcharr.sh * Update RAM and version in dispatcharr.json * Remove gcc from dependency installation * Update website and logo URLs in dispatcharr.json --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent 6c662ae commit abdbca5

File tree

4 files changed

+440
-0
lines changed

4 files changed

+440
-0
lines changed

ct/dispatcharr.sh

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: ekke85 | MickLesk
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Dispatcharr/Dispatcharr
7+
8+
APP="Dispatcharr"
9+
var_tags="${var_tags:-media;arr}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-8}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d "/opt/dispatcharr" ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
setup_uv
32+
NODE_VERSION="24" setup_nodejs
33+
34+
if check_for_gh_release "Dispatcharr" "Dispatcharr/Dispatcharr"; then
35+
msg_info "Stopping Services"
36+
systemctl stop dispatcharr-celery
37+
systemctl stop dispatcharr-celerybeat
38+
systemctl stop dispatcharr-daphne
39+
systemctl stop dispatcharr
40+
msg_ok "Stopped Services"
41+
42+
msg_info "Creating Backup"
43+
BACKUP_FILE="/opt/dispatcharr_backup_$(date +%F_%H-%M-%S).tar.gz"
44+
if [[ -f /opt/dispatcharr/.env ]]; then
45+
cp /opt/dispatcharr/.env /tmp/dispatcharr.env.backup
46+
fi
47+
if [[ -f /opt/dispatcharr/start-gunicorn.sh ]]; then
48+
cp /opt/dispatcharr/start-gunicorn.sh /tmp/start-gunicorn.sh.backup
49+
fi
50+
if [[ -f /opt/dispatcharr/start-celery.sh ]]; then
51+
cp /opt/dispatcharr/start-celery.sh /tmp/start-celery.sh.backup
52+
fi
53+
if [[ -f /opt/dispatcharr/start-celerybeat.sh ]]; then
54+
cp /opt/dispatcharr/start-celerybeat.sh /tmp/start-celerybeat.sh.backup
55+
fi
56+
if [[ -f /opt/dispatcharr/start-daphne.sh ]]; then
57+
cp /opt/dispatcharr/start-daphne.sh /tmp/start-daphne.sh.backup
58+
fi
59+
if [[ -f /opt/dispatcharr/.env ]]; then
60+
set -o allexport
61+
source /opt/dispatcharr/.env
62+
set +o allexport
63+
if [[ -n "$POSTGRES_DB" ]] && [[ -n "$POSTGRES_USER" ]] && [[ -n "$POSTGRES_PASSWORD" ]]; then
64+
PGPASSWORD=$POSTGRES_PASSWORD pg_dump -U $POSTGRES_USER -h ${POSTGRES_HOST:-localhost} $POSTGRES_DB >/tmp/dispatcharr_db_$(date +%F).sql
65+
msg_info "Database backup created"
66+
fi
67+
fi
68+
$STD tar -czf "$BACKUP_FILE" -C /opt dispatcharr /tmp/dispatcharr_db_*.sql
69+
msg_ok "Backup created: $BACKUP_FILE"
70+
71+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dispatcharr" "Dispatcharr/Dispatcharr"
72+
73+
msg_info "Updating Dispatcharr Backend"
74+
if [[ -f /tmp/dispatcharr.env.backup ]]; then
75+
mv /tmp/dispatcharr.env.backup /opt/dispatcharr/.env
76+
fi
77+
if [[ -f /tmp/start-gunicorn.sh.backup ]]; then
78+
mv /tmp/start-gunicorn.sh.backup /opt/dispatcharr/start-gunicorn.sh
79+
fi
80+
if [[ -f /tmp/start-celery.sh.backup ]]; then
81+
mv /tmp/start-celery.sh.backup /opt/dispatcharr/start-celery.sh
82+
fi
83+
if [[ -f /tmp/start-celerybeat.sh.backup ]]; then
84+
mv /tmp/start-celerybeat.sh.backup /opt/dispatcharr/start-celerybeat.sh
85+
fi
86+
if [[ -f /tmp/start-daphne.sh.backup ]]; then
87+
mv /tmp/start-daphne.sh.backup /opt/dispatcharr/start-daphne.sh
88+
fi
89+
90+
cd /opt/dispatcharr
91+
rm -rf .venv
92+
$STD uv venv
93+
$STD uv pip install -r requirements.txt --index-strategy unsafe-best-match
94+
$STD uv pip install gunicorn gevent celery redis daphne
95+
msg_ok "Updated Dispatcharr Backend"
96+
97+
msg_info "Building Frontend"
98+
cd /opt/dispatcharr/frontend
99+
$STD npm install --legacy-peer-deps
100+
$STD npm run build
101+
msg_ok "Built Frontend"
102+
103+
msg_info "Running Django Migrations"
104+
cd /opt/dispatcharr
105+
if [[ -f .env ]]; then
106+
set -o allexport
107+
source .env
108+
set +o allexport
109+
fi
110+
$STD uv run python manage.py migrate --noinput
111+
$STD uv run python manage.py collectstatic --noinput
112+
msg_ok "Migrations Complete"
113+
114+
msg_info "Starting Services"
115+
systemctl start dispatcharr
116+
systemctl start dispatcharr-celery
117+
systemctl start dispatcharr-celerybeat
118+
systemctl start dispatcharr-daphne
119+
msg_ok "Started Services"
120+
121+
msg_info "Cleaning up"
122+
rm -f /tmp/dispatcharr_db_*.sql
123+
msg_ok "Cleanup completed"
124+
msg_ok "Update Successfully!"
125+
fi
126+
exit
127+
}
128+
129+
start
130+
build_container
131+
description
132+
133+
msg_ok "Completed Successfully!\n"
134+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
135+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
136+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

ct/headers/dispatcharr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ _ __ __
2+
/ __ \(_)________ ____ _/ /______/ /_ ____ ___________
3+
/ / / / / ___/ __ \/ __ `/ __/ ___/ __ \/ __ `/ ___/ ___/
4+
/ /_/ / (__ ) /_/ / /_/ / /_/ /__/ / / / /_/ / / / /
5+
/_____/_/____/ .___/\__,_/\__/\___/_/ /_/\__,_/_/ /_/
6+
/_/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Dispatcharr",
3+
"slug": "dispatcharr",
4+
"categories": [
5+
14
6+
],
7+
"date_created": "2025-07-01",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 9191,
12+
"documentation": "https://dispatcharr.github.io/Dispatcharr-Docs/",
13+
"website": "https://github.com/Dispatcharr/Dispatcharr",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/dispatcharr.webp",
15+
"config_path": "/opt/dispatcharr/.env",
16+
"description": "Dispatcharr is an open-source powerhouse for managing IPTV streams and EPG data with elegance and control. Born from necessity and built with passion, it started as a personal project by OkinawaBoss and evolved with contributions from legends like dekzter, SergeantPanda and Bucatini.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/dispatcharr.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 2048,
24+
"hdd": 8,
25+
"os": "debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

0 commit comments

Comments
 (0)