mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-05 08:08:52 +02:00
Compare commits
4 Commits
fix/gitlab
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a23f908aa1 | ||
|
|
12e7cb1777 | ||
|
|
7f9e1ce4d8 | ||
|
|
d118f101d8 |
@@ -458,6 +458,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-05-04
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Databasus: update mongo-tools fallback to 100.16.1 and use now pnpm instead of npm ci [@MickLesk](https://github.com/MickLesk) ([#14240](https://github.com/community-scripts/ProxmoxVE/pull/14240))
|
||||
|
||||
## 2026-05-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -46,7 +46,7 @@ function update_script() {
|
||||
# Install MongoDB Database Tools via direct .deb (no APT repo for Debian 13)
|
||||
if ! command -v mongodump &>/dev/null; then
|
||||
[[ "$(get_os_info id)" == "ubuntu" ]] && MONGO_DIST="ubuntu2204" || MONGO_DIST="debian12"
|
||||
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-100.14.1.deb"
|
||||
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-100.16.1.deb"
|
||||
fi
|
||||
[[ -f /usr/bin/mongodump ]] && ln -sf /usr/bin/mongodump /usr/local/mongodb-database-tools/bin/mongodump
|
||||
[[ -f /usr/bin/mongorestore ]] && ln -sf /usr/bin/mongorestore /usr/local/mongodb-database-tools/bin/mongorestore
|
||||
@@ -66,9 +66,12 @@ function update_script() {
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
|
||||
|
||||
msg_info "Updating Databasus"
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
cd /opt/databasus/frontend
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
$STD corepack enable
|
||||
$STD corepack prepare pnpm@latest --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
cd /opt/databasus/backend
|
||||
$STD go mod download
|
||||
$STD /root/go/bin/swag init -g cmd/main.go -o swagger
|
||||
|
||||
6
ct/headers/matomo
Normal file
6
ct/headers/matomo
Normal file
@@ -0,0 +1,6 @@
|
||||
__ ___ __
|
||||
/ |/ /___ _/ /_____ ____ ___ ____
|
||||
/ /|_/ / __ `/ __/ __ \/ __ `__ \/ __ \
|
||||
/ / / / /_/ / /_/ /_/ / / / / / / /_/ /
|
||||
/_/ /_/\__,_/\__/\____/_/ /_/ /_/\____/
|
||||
|
||||
90
ct/matomo.sh
Normal file
90
ct/matomo.sh
Normal file
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/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://matomo.org/
|
||||
|
||||
APP="Matomo"
|
||||
var_tags="${var_tags:-analytics;tracking;privacy}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-16}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function flatten_matomo_layout() {
|
||||
if [[ -d /opt/matomo/matomo ]]; then
|
||||
msg_info "Migrating Legacy Layout"
|
||||
rm -rf /opt/matomo/tmp "/opt/matomo/How to install Matomo.html"
|
||||
find /opt/matomo/matomo -mindepth 1 -maxdepth 1 -exec mv -t /opt/matomo {} +
|
||||
rm -rf /opt/matomo/matomo
|
||||
msg_ok "Migrated Legacy Layout"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/matomo ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "matomo" "matomo-org/matomo"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop caddy
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
flatten_matomo_layout
|
||||
|
||||
msg_info "Backing up Data"
|
||||
[[ -f /opt/matomo/config/config.ini.php ]] && cp /opt/matomo/config/config.ini.php /opt/matomo_config.bak
|
||||
[[ -d /opt/matomo/misc/user ]] && cp -r /opt/matomo/misc/user /opt/matomo_user_backup
|
||||
[[ -f /root/matomo.creds ]] && cp /root/matomo.creds /opt/matomo_db_creds.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
|
||||
|
||||
flatten_matomo_layout
|
||||
|
||||
msg_info "Restoring Data"
|
||||
if [[ -f /opt/matomo_config.bak ]]; then
|
||||
mkdir -p /opt/matomo/config
|
||||
cp /opt/matomo_config.bak /opt/matomo/config/config.ini.php
|
||||
fi
|
||||
if [[ -d /opt/matomo_user_backup ]]; then
|
||||
mkdir -p /opt/matomo/misc/user
|
||||
cp -r /opt/matomo_user_backup/. /opt/matomo/misc/user
|
||||
fi
|
||||
[[ -f /opt/matomo_db_creds.bak ]] && cp /opt/matomo_db_creds.bak /root/matomo.creds
|
||||
rm -f /opt/matomo_config.bak /opt/matomo_db_creds.bak
|
||||
rm -rf /opt/matomo_user_backup
|
||||
chown -R www-data:www-data /opt/matomo
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start caddy
|
||||
msg_ok "Started Services"
|
||||
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 "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -32,7 +32,7 @@ for v in 12 13 14 15 16 18; do
|
||||
done
|
||||
# Install MongoDB Database Tools via direct .deb (no APT repo for Debian 13)
|
||||
[[ "$(get_os_info id)" == "ubuntu" ]] && MONGO_DIST="ubuntu2204" || MONGO_DIST="debian12"
|
||||
MONGO_VERSION=$(get_latest_gh_tag "mongodb/mongo-tools" "100." || echo "100.14.1")
|
||||
MONGO_VERSION=$(get_latest_gh_tag "mongodb/mongo-tools" "100." || echo "100.16.1")
|
||||
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-${MONGO_VERSION}.deb" ""
|
||||
mkdir -p /usr/local/mongodb-database-tools/bin
|
||||
[[ -f /usr/bin/mongodump ]] && ln -sf /usr/bin/mongodump /usr/local/mongodb-database-tools/bin/mongodump
|
||||
@@ -52,9 +52,12 @@ msg_ok "Installed Database Clients"
|
||||
fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
|
||||
|
||||
msg_info "Building Databasus (Patience)"
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
cd /opt/databasus/frontend
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
$STD corepack enable
|
||||
$STD corepack prepare pnpm@latest --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
cd /opt/databasus/backend
|
||||
$STD go mod tidy
|
||||
$STD go mod download
|
||||
|
||||
66
install/matomo-install.sh
Normal file
66
install/matomo-install.sh
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/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://matomo.org/
|
||||
|
||||
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 caddy
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
mkdir -p /opt/matomo
|
||||
|
||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="matomo" MARIADB_DB_USER="matomo" setup_mariadb_db
|
||||
|
||||
msg_info "Allowing Local TCP Database Access"
|
||||
$STD mariadb -u root -e "CREATE USER IF NOT EXISTS '$MARIADB_DB_USER'@'127.0.0.1' IDENTIFIED BY '$MARIADB_DB_PASS';"
|
||||
$STD mariadb -u root -e "ALTER USER '$MARIADB_DB_USER'@'127.0.0.1' IDENTIFIED BY '$MARIADB_DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON \`$MARIADB_DB_NAME\`.* TO '$MARIADB_DB_USER'@'127.0.0.1';"
|
||||
$STD mariadb -u root -e "FLUSH PRIVILEGES;"
|
||||
msg_ok "Allowed Local TCP Database Access"
|
||||
|
||||
fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
|
||||
|
||||
msg_info "Setting up Matomo"
|
||||
if [[ -d /opt/matomo/matomo ]]; then
|
||||
rm -rf /opt/matomo/tmp "/opt/matomo/How to install Matomo.html"
|
||||
find /opt/matomo/matomo -mindepth 1 -maxdepth 1 -exec mv -t /opt/matomo {} +
|
||||
rm -rf /opt/matomo/matomo
|
||||
fi
|
||||
mkdir -p /opt/matomo/tmp
|
||||
chown -R www-data:www-data /opt/matomo
|
||||
chmod -R 755 /opt/matomo/tmp
|
||||
msg_ok "Set up Matomo"
|
||||
|
||||
msg_info "Configuring Caddy"
|
||||
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
|
||||
cat <<EOF >/etc/caddy/Caddyfile
|
||||
:80 {
|
||||
root * /opt/matomo
|
||||
@blocked path /config /config/* /tmp /tmp/* /.* /.*/*
|
||||
respond @blocked 403
|
||||
php_fastcgi unix//run/php/php${PHP_VER}-fpm.sock
|
||||
file_server
|
||||
encode gzip
|
||||
}
|
||||
EOF
|
||||
usermod -aG www-data caddy
|
||||
msg_ok "Configured Caddy"
|
||||
|
||||
systemctl enable -q --now php${PHP_VER}-fpm
|
||||
systemctl restart caddy
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user