Compare commits

...
Author SHA1 Message Date
push-app-to-main[bot] 70099c20bc Add bugsink (ct) 2026-11-13 07:41:24 +00:00
Rögl-Brunner Michel c9ba40bfdb pr-script-test: fail the URL check on bad answers, not on non-200
Warpgate answers 401 on its root, a login wall, and the check failed it
(DevScripts issue 2537). Any answer now counts as the app being up,
except no answer, 404/410, a 5xx or a redirect loop. Same rule for VMs.
2026-11-13 08:32:29 +01:00
community-scripts-pr-app[bot]andgithub-actions[bot] b839ff1862 Update CHANGELOG.md (#18652)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-13 07:00:52 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] cb8a6fc098 Update CHANGELOG.md (#18651)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-13 07:00:28 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] bd07e8ad76 Update CHANGELOG.md (#18649)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:50:19 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 6118f400e4 Update CHANGELOG.md (#18648)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:50:03 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 47e16b872d Update CHANGELOG.md (#18647)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:43:16 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] dc84871d1f Update CHANGELOG.md (#18646)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:43:06 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] a575466d04 Update CHANGELOG.md (#18645)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:42:49 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 2cb5956e8c Update CHANGELOG.md (#18644)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 18:42:19 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 453d1a4699 Update CHANGELOG.md (#18643)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-12 17:15:14 +00:00
CanbiZ (MickLesk) 851f9622ac OnlyOffice: change ct port to 8083 (#18642) 2026-11-12 18:14:42 +01:00
6 changed files with 201 additions and 9 deletions

No files matched your search

+19 -5
View File
@@ -373,6 +373,20 @@ setup_error() {
exit 1
}
# Any answer means the app is up, unless it says it isn't: nothing at all,
# 404/410 (the printed URL leads nowhere), 5xx (server error, proxy without
# backend), or a 3xx left after 5 redirects (a loop). 401/403 are a login
# wall (warpgate answers 401), 400 a quirk of the app: both pass.
url_ok() { [[ "$1" =~ ^[1-4][0-9][0-9]$ && ! "$1" =~ ^(3[0-9][0-9]|404|410)$ ]]; }
url_why() {
case "$1" in
404 | 410) echo "the printed URL leads nowhere" ;;
5??) echo "server error" ;;
3??) echo "still redirecting after 5 hops" ;;
*) echo "the app never answered" ;;
esac
}
# --- Reserve a container ID ---------------------------------------------------
# A lock file per ID, not just "first free one", because the engine only creates
# the container minutes later and two jobs would otherwise pick the same ID.
@@ -615,8 +629,8 @@ take_screenshot() {
}
# Is the app up? No failed services, and the URL the script tells the user to
# open, e.g. http://${IP}:1337/admin, answers 200 (after redirects, so a jump
# to /login is fine). A script that prints no URL has no web UI to check.
# open, e.g. http://${IP}:1337/admin, answers without an error (see url_ok;
# redirects are followed, so a jump to /login is fine). A script that prints no URL has no web UI to check.
# Run after the install and again after the update. Sets health_problem.
app_url() { # the URL the script at $1 tells the user to open
local pattern
@@ -639,13 +653,13 @@ check_health() {
local waited
for ((waited = 0; waited < URL_WAIT; waited += 5)); do
http_code=$(curl -sk -L --max-redirs 5 -o /dev/null -w '%{http_code}' --max-time 10 "$url" || true)
[[ "$http_code" =~ ^2[0-9][0-9]$ ]] && break
url_ok "$http_code" && break
sleep 5
done
# Also when the check fails: an error page explains more than a status code.
[[ "$http_code" =~ ^[1-5][0-9][0-9]$ ]] && take_screenshot "$1"
[[ "$http_code" =~ ^2[0-9][0-9]$ ]] ||
{ health_problem="${url} answered ${http_code/#000/nothing} instead of 200 within ${URL_WAIT}s"; return 1; }
url_ok "$http_code" ||
{ health_problem="${url} answered ${http_code/#000/nothing} within ${URL_WAIT}s ($(url_why "$http_code"))"; return 1; }
}
check_health screenshot.png || fail "$health_problem"
+3 -3
View File
@@ -121,7 +121,7 @@ vm_build_and_check() {
for ((waited = 0; waited < VM_URL_WAIT; waited += 10)); do
vm_running || fail "VM ${ctid} stopped by itself while its web UI was awaited"
http_code=$(curl -sk -L --max-redirs 5 -o /dev/null -w '%{http_code}' --max-time 10 "$url" || true)
[[ "$http_code" =~ ^2[0-9][0-9]$ ]] && break
url_ok "$http_code" && break
sleep 10
done
[[ "$http_code" =~ ^[1-5][0-9][0-9]$ ]] && take_screenshot screenshot.png
@@ -130,8 +130,8 @@ vm_build_and_check() {
sleep 20
fi
[[ -s "$OUT_DIR/screenshot.png" ]] || vm_console_shot
if [[ -n "$url" && ! "$http_code" =~ ^2[0-9][0-9]$ ]]; then
fail "${url} answered ${http_code/#000/nothing} instead of 200 within ${VM_URL_WAIT}s"
if [[ -n "$url" ]] && ! url_ok "$http_code"; then
fail "${url} answered ${http_code/#000/nothing} within ${VM_URL_WAIT}s"
fi
vm_running || fail "VM ${ctid} stopped by itself"
+22
View File
@@ -581,6 +581,15 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-13
### 💾 Core
- fetch the install script before the container is created [@MickLesk](https://github.com/MickLesk) ([core#236](https://github.com/community-scripts/core/pull/236))
- Download a corrupt local template again instead of keeping it [@MickLesk](https://github.com/MickLesk) ([core#235](https://github.com/community-scripts/core/pull/235))
- core: say why a container stopped by itself during its setup [@MickLesk](https://github.com/MickLesk) ([core#234](https://github.com/community-scripts/core/pull/234))
- Shield pct start and the template check from a closed console [@MickLesk](https://github.com/MickLesk) ([core#239](https://github.com/community-scripts/core/pull/239))
## 2026-11-12
### 🆕 New Scripts
@@ -591,6 +600,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- OnlyOffice: change ct port to 8083 [@MickLesk](https://github.com/MickLesk) ([#18642](https://github.com/community-scripts/ProxmoxVE/pull/18642))
- dotnetaspwebapi: start the service only once an app is deployed [@MickLesk](https://github.com/MickLesk) ([#18639](https://github.com/community-scripts/ProxmoxVE/pull/18639))
- Whisparr-eros: set the first login and save it [@MickLesk](https://github.com/MickLesk) ([#18617](https://github.com/community-scripts/ProxmoxVE/pull/18617))
@@ -598,6 +608,18 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- Updated ASP.NET Web App script to Debian and adds a .Net selection [@kris701](https://github.com/kris701) ([#18628](https://github.com/community-scripts/ProxmoxVE/pull/18628))
### 💾 Core
- github: bump workflow actions to their current majors [@MickLesk](https://github.com/MickLesk) ([core#240](https://github.com/community-scripts/core/pull/240))
- Say what the host sees when a container gets no address [@MickLesk](https://github.com/MickLesk) ([core#230](https://github.com/community-scripts/core/pull/230))
- Fall back to public DNS for Alpine containers too [@MickLesk](https://github.com/MickLesk) ([core#231](https://github.com/community-scripts/core/pull/231))
- Do not fail a finished install over the monitoring service [@MickLesk](https://github.com/MickLesk) ([core#232](https://github.com/community-scripts/core/pull/232))
- Deploy a release by moving it, and stop on a full disk² [@MickLesk](https://github.com/MickLesk) ([core#233](https://github.com/community-scripts/core/pull/233))
- core: say when pct create fails because timedatectl does not answer [@MickLesk](https://github.com/MickLesk) ([core#237](https://github.com/community-scripts/core/pull/237))
- ref: stop calling every exit 255 a dpkg error [@MickLesk](https://github.com/MickLesk) ([core#238](https://github.com/community-scripts/core/pull/238))
- Write uv's shell completions without STD [@MickLesk](https://github.com/MickLesk) ([core#241](https://github.com/community-scripts/core/pull/241))
- Generate database passwords with random_password / Keep the database helpers' credentials files private [@MickLesk](https://github.com/MickLesk) ([core#242](https://github.com/community-scripts/core/pull/242))
### 📚 Documentation
- github: bump workflow actions to their current majors [@MickLesk](https://github.com/MickLesk) ([#18637](https://github.com/community-scripts/ProxmoxVE/pull/18637))
+70
View File
@@ -0,0 +1,70 @@
#!/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/bugsink/bugsink
APP="Bugsink"
var_tags="${var_tags:-monitoring;error-tracking;sentry}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
export var_admin_email="${var_admin_email:-}"
export var_admin_pass="${var_admin_pass:-}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bugsink ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "bugsink" "bugsink/bugsink"; then
msg_info "Stopping Bugsink"
systemctl stop bugsink bugsink-snappea
msg_ok "Stopped Bugsink"
PYTHON_VERSION="3.12" setup_uv
msg_info "Updating Bugsink"
$STD uv pip install --upgrade --python /opt/bugsink/.venv/bin/python "bugsink==${CHECK_UPDATE_RELEASE}"
cd /opt/bugsink_data
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate snappea --database=snappea
cat <<EOF >~/.bugsink
${CHECK_UPDATE_RELEASE}
EOF
msg_ok "Updated Bugsink"
msg_info "Starting Bugsink"
systemctl start bugsink bugsink-snappea
msg_ok "Started Bugsink"
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}:8000${CL}"
echo -e "${INFO}${YW}Admin login: /opt/bugsink_data/.env (inside the container)${CL}"
+1 -1
View File
@@ -52,4 +52,4 @@ 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 "${GATEWAY}${BGN}http://${IP}:8083${CL}"
+86
View File
@@ -0,0 +1,86 @@
#!/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/bugsink/bugsink
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
PYTHON_VERSION="3.12" setup_uv
msg_info "Installing Bugsink"
BUGSINK_VERSION="${var_appversion:-$(get_latest_github_release "bugsink/bugsink")}"
$STD uv venv --python 3.12 /opt/bugsink/.venv
$STD uv pip install --python /opt/bugsink/.venv/bin/python "bugsink==${BUGSINK_VERSION}"
cat <<EOF >~/.bugsink
${BUGSINK_VERSION}
EOF
msg_ok "Installed Bugsink"
msg_info "Configuring Bugsink"
ADMIN_EMAIL="${var_admin_email:-admin@localhost}"
ADMIN_PASS="${var_admin_pass:-$(random_password)}"
mkdir -p /opt/bugsink_data
cd /opt/bugsink_data
$STD /opt/bugsink/.venv/bin/bugsink-create-conf --template=singleserver --host="${LOCAL_IP}" --base-dir=/opt/bugsink_data
sed -i \
-e "s|\"BASE_URL\": \"https://${LOCAL_IP}\"|\"BASE_URL\": \"http://${LOCAL_IP}:8000\"|" \
-e 's|^SESSION_COOKIE_SECURE = True|SESSION_COOKIE_SECURE = False|' \
-e 's|^CSRF_COOKIE_SECURE = True|CSRF_COOKIE_SECURE = False|' \
-e 's|^USE_X_REAL_IP = True|USE_X_REAL_IP = False|' \
/opt/bugsink_data/bugsink_conf.py
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate snappea --database=snappea
DJANGO_SUPERUSER_PASSWORD="$ADMIN_PASS" $STD /opt/bugsink/.venv/bin/bugsink-manage createsuperuser --noinput --username "$ADMIN_EMAIL" --email "$ADMIN_EMAIL"
cat <<EOF >/opt/bugsink_data/.env
BUGSINK_ADMIN_EMAIL=${ADMIN_EMAIL}
BUGSINK_ADMIN_PASSWORD=${ADMIN_PASS}
EOF
chmod 600 /opt/bugsink_data/.env /opt/bugsink_data/bugsink_conf.py
msg_ok "Configured Bugsink"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/bugsink.service
[Unit]
Description=Bugsink
After=network.target
[Service]
Type=notify
WorkingDirectory=/opt/bugsink_data
Environment=PYTHONUNBUFFERED=1
ExecStart=/opt/bugsink/.venv/bin/gunicorn --bind=0.0.0.0:8000 --workers=4 --max-requests=1000 --max-requests-jitter=100 --access-logfile - bugsink.wsgi
Restart=always
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/bugsink-snappea.service
[Unit]
Description=Bugsink Snappea
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/bugsink_data
Environment=PYTHONUNBUFFERED=1
ExecStart=/opt/bugsink/.venv/bin/bugsink-runsnappea
Restart=always
RuntimeMaxSec=1d
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bugsink bugsink-snappea
msg_ok "Created Services"
motd_ssh
customize
cleanup_lxc