mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-08 06:57:37 +00:00
Compare commits
10 Commits
threadfin_
...
MickLesk-p
Author | SHA1 | Date | |
---|---|---|---|
8aa8ceccce | |||
5c5d5d52ce | |||
c2a7e990bd | |||
3847442ca5 | |||
6996111473 | |||
3336f6a6f5 | |||
be6a63cd03 | |||
160846e98b | |||
e63128625e | |||
e58ad9237a |
27
.github/autolabeler-config.json
generated
vendored
27
.github/autolabeler-config.json
generated
vendored
@ -121,5 +121,32 @@
|
|||||||
],
|
],
|
||||||
"excludeGlobs": []
|
"excludeGlobs": []
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"addon": [
|
||||||
|
{
|
||||||
|
"fileStatus": null,
|
||||||
|
"includeGlobs": [
|
||||||
|
"tools/addon/**"
|
||||||
|
],
|
||||||
|
"excludeGlobs": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pve-tool": [
|
||||||
|
{
|
||||||
|
"fileStatus": null,
|
||||||
|
"includeGlobs": [
|
||||||
|
"tools/pve/**"
|
||||||
|
],
|
||||||
|
"excludeGlobs": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vm": [
|
||||||
|
{
|
||||||
|
"fileStatus": null,
|
||||||
|
"includeGlobs": [
|
||||||
|
"vm/**"
|
||||||
|
],
|
||||||
|
"excludeGlobs": []
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
36
.github/workflows/autolabeler.yml
generated
vendored
36
.github/workflows/autolabeler.yml
generated
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install minimatch
|
run: npm install minimatch
|
||||||
|
|
||||||
- name: Label PR based on file changes and PR template
|
- name: Label PR based on file changes and PR template
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
@ -43,51 +43,51 @@ jobs:
|
|||||||
pull_number: prNumber,
|
pull_number: prNumber,
|
||||||
});
|
});
|
||||||
const prFiles = prListFilesResponse.data;
|
const prFiles = prListFilesResponse.data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Apply labels based on file changes
|
|
||||||
for (const [label, rules] of Object.entries(autolabelerConfig)) {
|
for (const [label, rules] of Object.entries(autolabelerConfig)) {
|
||||||
const shouldAddLabel = prFiles.some((prFile) => {
|
const shouldAddLabel = prFiles.some((prFile) => {
|
||||||
return rules.some((rule) => {
|
return rules.some((rule) => {
|
||||||
const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true;
|
const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true;
|
||||||
const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob));
|
const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob));
|
||||||
const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob));
|
const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob));
|
||||||
|
|
||||||
return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch;
|
return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (shouldAddLabel) {
|
if (shouldAddLabel) {
|
||||||
labelsToAdd.add(label);
|
labelsToAdd.add(label);
|
||||||
|
if (label === "update script") {
|
||||||
|
for (const prFile of prFiles) {
|
||||||
|
const filename = prFile.filename;
|
||||||
|
if (filename.startsWith("vm/")) labelsToAdd.add("vm");
|
||||||
|
if (filename.startsWith("tools/addon/")) labelsToAdd.add("addon");
|
||||||
|
if (filename.startsWith("tools/pve/")) labelsToAdd.add("pve-tool");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if two labels or more are added, return
|
|
||||||
if (labelsToAdd.size < 2) {
|
if (labelsToAdd.size < 2) {
|
||||||
const templateLabelMappings = {
|
const templateLabelMappings = {
|
||||||
"🐞 **Bug fix**": "bugfix",
|
"🐞 **Bug fix**": "bugfix",
|
||||||
"✨ **New feature**": "feature",
|
"✨ **New feature**": "feature",
|
||||||
"💥 **Breaking change**": "breaking change",
|
"💥 **Breaking change**": "breaking change",
|
||||||
|
"🆕 **New script**": "new script",
|
||||||
|
"🌍 **Website update**": "website",
|
||||||
"🔧 **Refactoring / Code Cleanup**": "refactor",
|
"🔧 **Refactoring / Code Cleanup**": "refactor",
|
||||||
|
"📝 **Documentation update**": "documentation"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
||||||
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
||||||
const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i");
|
const regex = new RegExp(`- \[(x|X)\]\s*.*${escapedCheckbox}`, "i");
|
||||||
const match = prBody.match(regex);
|
if (regex.test(prBody)) {
|
||||||
if (match) {
|
|
||||||
console.log(`Match: ${match}`);
|
|
||||||
labelsToAdd.add(label);
|
labelsToAdd.add(label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`);
|
|
||||||
|
|
||||||
if (labelsToAdd.size > 0) {
|
if (labelsToAdd.size > 0) {
|
||||||
console.log(`Adding labels ${Array.from(labelsToAdd).join(", ")} to PR ${prNumber}`);
|
|
||||||
await github.rest.issues.addLabels({
|
await github.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -18,8 +18,18 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Bookstack: Fix PHP Issue & Bump to PHP 8.3 [@MickLesk](https://github.com/MickLesk) ([#5779](https://github.com/community-scripts/ProxmoxVE/pull/5779))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- tools.func: better handling when unpacking tarfiles in prebuild mode [@MickLesk](https://github.com/MickLesk) ([#5781](https://github.com/community-scripts/ProxmoxVE/pull/5781))
|
||||||
|
- tools.func: add AVX check for MongoDB [@MickLesk](https://github.com/MickLesk) ([#5780](https://github.com/community-scripts/ProxmoxVE/pull/5780))
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: Baby Buddy [@tremor021](https://github.com/tremor021) ([#5769](https://github.com/community-scripts/ProxmoxVE/pull/5769))
|
||||||
- Refactor: Changed the way we install BunkerWeb by leveraging the brand new install-bunkerweb.sh [@TheophileDiot](https://github.com/TheophileDiot) ([#5707](https://github.com/community-scripts/ProxmoxVE/pull/5707))
|
- Refactor: Changed the way we install BunkerWeb by leveraging the brand new install-bunkerweb.sh [@TheophileDiot](https://github.com/TheophileDiot) ([#5707](https://github.com/community-scripts/ProxmoxVE/pull/5707))
|
||||||
|
|
||||||
### 🌐 Website
|
### 🌐 Website
|
||||||
|
@ -29,7 +29,7 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/babybuddy_version.txt)" ]]; then
|
if [[ "${RELEASE}" != "$(cat ~/.babybuddy 2>/dev/null)" ]] || [[ ! -f ~/.babybuddy ]]; then
|
||||||
setup_uv
|
setup_uv
|
||||||
|
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
@ -42,17 +42,14 @@ function update_script() {
|
|||||||
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf {} +
|
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf {} +
|
||||||
msg_ok "Cleaned old files"
|
msg_ok "Cleaned old files"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "babybuddy" "babybuddy/babybuddy"
|
||||||
|
|
||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
cd /opt/babybuddy
|
cd /opt/babybuddy
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
|
|
||||||
mv /tmp/production.py.bak babybuddy/settings/production.py
|
mv /tmp/production.py.bak babybuddy/settings/production.py
|
||||||
cd /opt/babybuddy
|
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
$STD uv pip install -r requirements.txt
|
$STD uv pip install -r requirements.txt
|
||||||
$STD python manage.py migrate
|
$STD python manage.py migrate
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Fixing permissions"
|
msg_info "Fixing permissions"
|
||||||
@ -66,9 +63,6 @@ function update_script() {
|
|||||||
systemctl start nginx
|
systemctl start nginx
|
||||||
msg_ok "Services Started"
|
msg_ok "Services Started"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -f "$temp_file"
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
@ -39,6 +39,7 @@ function update_script() {
|
|||||||
msg_ok "Backup finished"
|
msg_ok "Backup finished"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack"
|
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack"
|
||||||
|
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
|
||||||
|
|
||||||
msg_info "Restoring backup"
|
msg_info "Restoring backup"
|
||||||
cp /opt/bookstack-backup/.env /opt/bookstack/.env
|
cp /opt/bookstack-backup/.env /opt/bookstack/.env
|
||||||
|
4
frontend/public/json/proxmox-backup-server.json
generated
4
frontend/public/json/proxmox-backup-server.json
generated
@ -35,6 +35,10 @@
|
|||||||
{
|
{
|
||||||
"text": "Set a root password if using autologin. This will be the PBS password. `passwd root`",
|
"text": "Set a root password if using autologin. This will be the PBS password. `passwd root`",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Advanced Install is only possible without root password and root SSH access, you can configure this after installation.",
|
||||||
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,10 @@ $STD apt-get install -y \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
setup_uv
|
setup_uv
|
||||||
|
fetch_and_deploy_gh_release "babybuddy" "babybuddy/babybuddy"
|
||||||
|
|
||||||
msg_info "Installing Babybuddy"
|
msg_info "Installing Babybuddy"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
mkdir -p /opt/data
|
||||||
temp_file=$(mktemp)
|
|
||||||
mkdir -p /opt/{babybuddy,data}
|
|
||||||
curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
|
|
||||||
cd /opt/babybuddy
|
cd /opt/babybuddy
|
||||||
$STD uv venv .venv
|
$STD uv venv .venv
|
||||||
$STD source .venv/bin/activate
|
$STD source .venv/bin/activate
|
||||||
@ -102,7 +99,6 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f "$temp_file"
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
@ -19,7 +19,8 @@ $STD apt-get install -y \
|
|||||||
make
|
make
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PHP_MODULE="fpm, ldap, tidy, bz2, mysql" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.2" setup_php
|
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
|
||||||
|
|
||||||
setup_composer
|
setup_composer
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
|
||||||
|
@ -434,6 +434,13 @@ function setup_php() {
|
|||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for pkg in $MODULE_LIST; do
|
||||||
|
if ! apt-cache show "$pkg" >/dev/null 2>&1; then
|
||||||
|
msg_error "Package not found: $pkg"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
local MODULE_LIST="php${PHP_VERSION}"
|
local MODULE_LIST="php${PHP_VERSION}"
|
||||||
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
|
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
|
||||||
for mod in "${MODULES[@]}"; do
|
for mod in "${MODULES[@]}"; do
|
||||||
@ -443,6 +450,10 @@ function setup_php() {
|
|||||||
if [[ "$PHP_FPM" == "YES" ]]; then
|
if [[ "$PHP_FPM" == "YES" ]]; then
|
||||||
MODULE_LIST+=" php${PHP_VERSION}-fpm"
|
MODULE_LIST+=" php${PHP_VERSION}-fpm"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$PHP_APACHE" == "YES" ]]; then
|
||||||
|
$STD apt-get install -y apache2
|
||||||
|
$STD systemctl restart apache2 || true
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
|
if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
|
||||||
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
|
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
|
||||||
@ -458,10 +469,6 @@ function setup_php() {
|
|||||||
$STD apt-get install -y $MODULE_LIST
|
$STD apt-get install -y $MODULE_LIST
|
||||||
msg_ok "Setup PHP $PHP_VERSION"
|
msg_ok "Setup PHP $PHP_VERSION"
|
||||||
|
|
||||||
if [[ "$PHP_APACHE" == "YES" ]]; then
|
|
||||||
$STD systemctl restart apache2 || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$PHP_FPM" == "YES" ]]; then
|
if [[ "$PHP_FPM" == "YES" ]]; then
|
||||||
$STD systemctl enable php${PHP_VERSION}-fpm
|
$STD systemctl enable php${PHP_VERSION}-fpm
|
||||||
$STD systemctl restart php${PHP_VERSION}-fpm
|
$STD systemctl restart php${PHP_VERSION}-fpm
|
||||||
@ -651,6 +658,15 @@ function setup_mongodb() {
|
|||||||
DISTRO_ID=$(awk -F= '/^ID=/{ gsub(/"/,"",$2); print $2 }' /etc/os-release)
|
DISTRO_ID=$(awk -F= '/^ID=/{ gsub(/"/,"",$2); print $2 }' /etc/os-release)
|
||||||
DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{ print $2 }' /etc/os-release)
|
DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{ print $2 }' /etc/os-release)
|
||||||
|
|
||||||
|
# Check AVX support
|
||||||
|
if ! grep -qm1 'avx[^ ]*' /proc/cpuinfo; then
|
||||||
|
local major="${MONGO_VERSION%%.*}"
|
||||||
|
if ((major > 5)); then
|
||||||
|
msg_error "MongoDB ${MONGO_VERSION} requires AVX support, which is not available on this system."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
case "$DISTRO_ID" in
|
case "$DISTRO_ID" in
|
||||||
ubuntu)
|
ubuntu)
|
||||||
MONGO_BASE_URL="https://repo.mongodb.org/apt/ubuntu"
|
MONGO_BASE_URL="https://repo.mongodb.org/apt/ubuntu"
|
||||||
@ -941,7 +957,11 @@ function fetch_and_deploy_gh_release() {
|
|||||||
fi
|
fi
|
||||||
$STD unzip "$tmpdir/$filename" -d "$target"
|
$STD unzip "$tmpdir/$filename" -d "$target"
|
||||||
elif [[ "$filename" == *.tar.* ]]; then
|
elif [[ "$filename" == *.tar.* ]]; then
|
||||||
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then
|
||||||
|
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
||||||
|
else
|
||||||
|
tar -xf "$tmpdir/$filename" -C "$target"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg_error "Unsupported archive format: $filename"
|
msg_error "Unsupported archive format: $filename"
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
|
Reference in New Issue
Block a user