mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-25 00:34:57 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c3fb14c55 | |||
| c356c3827a | |||
| 6f2d3da61f | |||
| f7acb76e80 | |||
| b2ecd86698 | |||
| df10a5ea53 | |||
| 3a65047ff9 | |||
| 5b01ff81e8 |
+10
-2
@@ -488,18 +488,26 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
## 2026-06-24
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
### 🆕 New Scripts
|
||||
|
||||
- enabling rewirte module in apache [@d3v3lop3rDE](https://github.com/d3v3lop3rDE) ([#15360](https://github.com/community-scripts/ProxmoxVE/pull/15360))
|
||||
- SnapOtter ([#15368](https://github.com/community-scripts/ProxmoxVE/pull/15368))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- enabling rewirte module in apache [@d3v3lop3rDE](https://github.com/d3v3lop3rDE) ([#15360](https://github.com/community-scripts/ProxmoxVE/pull/15360))
|
||||
- watcharr: Increase default RAM allocation from 1024 to 2048 [@MickLesk](https://github.com/MickLesk) ([#15370](https://github.com/community-scripts/ProxmoxVE/pull/15370))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor LibreNMS: replace old install and update variant with tarball approach [@MickLesk](https://github.com/MickLesk) ([#15369](https://github.com/community-scripts/ProxmoxVE/pull/15369))
|
||||
|
||||
### 🗑️ Deleted Scripts
|
||||
|
||||
- delete wger [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15380](https://github.com/community-scripts/ProxmoxVE/pull/15380))
|
||||
- Delete ghost [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15377](https://github.com/community-scripts/ProxmoxVE/pull/15377))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
#!/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: fabrice1236
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://ghost.org/ | Github: https://github.com/TryGhost/Ghost
|
||||
|
||||
APP="Ghost"
|
||||
var_tags="${var_tags:-cms;blog}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
setup_mariadb
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
ensure_dependencies git
|
||||
|
||||
msg_info "Updating Ghost"
|
||||
if command -v ghost &>/dev/null; then
|
||||
current_version=$(ghost version | grep 'Ghost-CLI version' | awk '{print $3}')
|
||||
latest_version=$(npm show ghost-cli version)
|
||||
if [ "$current_version" != "$latest_version" ]; then
|
||||
msg_info "Updating ${APP} from version v${current_version} to v${latest_version}"
|
||||
$STD npm install -g ghost-cli@latest
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "${APP} is already at v${current_version}"
|
||||
fi
|
||||
else
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
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}:2368${CL}"
|
||||
@@ -1,6 +0,0 @@
|
||||
________ __
|
||||
/ ____/ /_ ____ _____/ /_
|
||||
/ / __/ __ \/ __ \/ ___/ __/
|
||||
/ /_/ / / / / /_/ (__ ) /_
|
||||
\____/_/ /_/\____/____/\__/
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
_____ ____ __ __
|
||||
/ ___/____ ____ _____ / __ \/ /_/ /____ _____
|
||||
\__ \/ __ \/ __ `/ __ \/ / / / __/ __/ _ \/ ___/
|
||||
___/ / / / / /_/ / /_/ / /_/ / /_/ /_/ __/ /
|
||||
/____/_/ /_/\__,_/ .___/\____/\__/\__/\___/_/
|
||||
/_/
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
_ ______ ____ _____
|
||||
| | /| / / __ `/ _ \/ ___/
|
||||
| |/ |/ / /_/ / __/ /
|
||||
|__/|__/\__, /\___/_/
|
||||
/____/
|
||||
@@ -0,0 +1,63 @@
|
||||
#!/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://snapotter.com
|
||||
|
||||
APP="SnapOtter"
|
||||
var_tags="${var_tags:-media;image}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/snapotter ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "snapotter" "snapotter-hq/SnapOtter"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop snapotter
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "snapotter" "snapotter-hq/SnapOtter" "tarball"
|
||||
|
||||
msg_info "Updating SnapOtter"
|
||||
cd /opt/snapotter
|
||||
$STD npm pkg delete scripts.prepare
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter @snapotter/web build
|
||||
sed -i 's/mediapipe==0.10.21/mediapipe>=0.10.21/' /opt/snapotter/docker/feature-manifest.json
|
||||
msg_ok "Updated SnapOtter"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start snapotter
|
||||
msg_ok "Started Service"
|
||||
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}:1349${CL}"
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
#!/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: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/wger-project/wger
|
||||
|
||||
APP="wger"
|
||||
var_tags="${var_tags:-management;fitness}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/wger ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "wger" "wger-project/wger"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop redis-server nginx celery celery-beat wger
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
cp -r /opt/wger/media /opt/wger_media_backup
|
||||
cp /opt/wger/.env /opt/wger_env_backup
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wger" "wger-project/wger" "tarball"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
cp -r /opt/wger_media_backup/. /opt/wger/media
|
||||
cp /opt/wger_env_backup /opt/wger/.env
|
||||
rm -rf /opt/wger_media_backup /opt/wger_env_backup
|
||||
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Updating wger"
|
||||
cd /opt/wger
|
||||
set -a && source /opt/wger/.env && set +a
|
||||
export DJANGO_SETTINGS_MODULE=settings.main
|
||||
$STD uv pip install .
|
||||
$STD npm install
|
||||
$STD npm run build:css:sass
|
||||
$STD uv run python manage.py migrate
|
||||
$STD uv run python manage.py collectstatic --no-input
|
||||
msg_ok "Updated wger"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start redis-server nginx celery celery-beat wger
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: fabrice1236
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://ghost.org/ | Github: https://github.com/TryGhost/Ghost
|
||||
|
||||
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 \
|
||||
nginx \
|
||||
ca-certificates \
|
||||
libjemalloc2 \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="ghost" MARIADB_DB_USER="ghostuser" setup_mariadb_db
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Installing Ghost CLI"
|
||||
$STD npm install ghost-cli@latest -g
|
||||
msg_ok "Installed Ghost CLI"
|
||||
|
||||
msg_info "Creating Service"
|
||||
$STD adduser --disabled-password --gecos "Ghost user" ghost-user
|
||||
$STD usermod -aG sudo ghost-user
|
||||
echo "ghost-user ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/ghost-user
|
||||
mkdir -p /var/www/ghost
|
||||
chown -R ghost-user:ghost-user /var/www/ghost
|
||||
chmod 775 /var/www/ghost
|
||||
$STD sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=$MARIADB_DB_USER --dbpass=$MARIADB_DB_PASS --dbname=$MARIADB_DB_NAME --url=http://localhost:2368 --no-prompt --no-setup-nginx --no-setup-ssl --no-setup-mysql --enable --start --ip 0.0.0.0"
|
||||
rm /etc/sudoers.d/ghost-user
|
||||
msg_ok "Creating Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,102 @@
|
||||
#!/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://snapotter.com
|
||||
|
||||
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 \
|
||||
imagemagick \
|
||||
ghostscript \
|
||||
potrace \
|
||||
libopenjp2-tools \
|
||||
libegl1 \
|
||||
libwayland-client0 \
|
||||
libwayland-cursor0 \
|
||||
libwayland-egl1 \
|
||||
libxkbcommon0 \
|
||||
libxkbcommon-x11-0 \
|
||||
libxcursor1 \
|
||||
python3 \
|
||||
python3-dev \
|
||||
gcc \
|
||||
g++
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.11" setup_uv
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
fetch_and_deploy_gh_release "caire" "esimov/caire" "prebuild" "latest" "/usr/local/bin" "caire-*-linux-amd64.tar.gz"
|
||||
fetch_and_deploy_gh_release "snapotter" "snapotter-hq/SnapOtter" "prebuild" "latest" "/opt/snapotter" "snapotter-*-linux-amd64.tar.gz"
|
||||
|
||||
msg_info "Setting up Python Environment"
|
||||
mkdir -p /opt/snapotter_data/ai/models/rembg
|
||||
$STD uv python install 3.11
|
||||
$STD uv venv --seed --python 3.11 /opt/snapotter_data/ai/venv
|
||||
#if [[ -f /opt/snapotter/packages/ai/python/requirements.txt ]]; then
|
||||
# $STD uv pip install \
|
||||
# --python /opt/snapotter_data/ai/venv/bin/python \
|
||||
# -r /opt/snapotter/packages/ai/python/requirements.txt
|
||||
#fi
|
||||
ln -sfn /opt/snapotter /app
|
||||
msg_ok "Set up Python Environment"
|
||||
|
||||
msg_info "Configuring SnapOtter"
|
||||
mkdir -p /opt/snapotter_data/files
|
||||
mkdir -p /tmp/snapotter-workspace
|
||||
|
||||
cat <<EOF >/opt/snapotter_data/.env
|
||||
PORT=1349
|
||||
NODE_ENV=production
|
||||
DB_PATH=/opt/snapotter_data/snapotter.db
|
||||
WORKSPACE_PATH=/tmp/snapotter-workspace
|
||||
FILES_STORAGE_PATH=/opt/snapotter_data/files
|
||||
PYTHON_VENV_PATH=/opt/snapotter_data/ai/venv
|
||||
MODELS_PATH=/opt/snapotter_data/ai/models
|
||||
DATA_DIR=/opt/snapotter_data
|
||||
FEATURE_MANIFEST_PATH=/opt/snapotter/docker/feature-manifest.json
|
||||
U2NET_HOME=/opt/snapotter_data/ai/models/rembg
|
||||
AUTH_ENABLED=true
|
||||
DEFAULT_USERNAME=admin
|
||||
DEFAULT_PASSWORD=admin
|
||||
LOG_LEVEL=info
|
||||
TRUST_PROXY=true
|
||||
FILE_MAX_AGE_HOURS=72
|
||||
CLEANUP_INTERVAL_MINUTES=60
|
||||
ANALYTICS_ENABLED=false
|
||||
EOF
|
||||
msg_ok "Configured SnapOtter"
|
||||
|
||||
msg_info "Creating Service"
|
||||
PNPM_BIN="$(command -v pnpm)"
|
||||
cat <<EOF >/etc/systemd/system/snapotter.service
|
||||
[Unit]
|
||||
Description=SnapOtter Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/snapotter
|
||||
EnvironmentFile=/opt/snapotter_data/.env
|
||||
ExecStart=${PNPM_BIN} --filter @snapotter/api run start
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now snapotter
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,182 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/wger-project/wger
|
||||
|
||||
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 \
|
||||
build-essential \
|
||||
nginx \
|
||||
redis-server \
|
||||
libpq-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="sass" setup_nodejs
|
||||
setup_uv
|
||||
PG_VERSION="16" setup_postgresql
|
||||
PG_DB_NAME="wger" PG_DB_USER="wger" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "wger" "wger-project/wger" "tarball"
|
||||
|
||||
msg_info "Setting up wger"
|
||||
mkdir -p /opt/wger/{static,media}
|
||||
chmod o+w /opt/wger/media
|
||||
cd /opt/wger
|
||||
|
||||
$STD npm install
|
||||
$STD npm run build:css:sass
|
||||
$STD uv venv
|
||||
$STD uv pip install . --group docker
|
||||
SECRET_KEY=$(openssl rand -base64 40)
|
||||
cat <<EOF >/opt/wger/.env
|
||||
DJANGO_SETTINGS_MODULE=settings.main
|
||||
PYTHONPATH=/opt/wger
|
||||
|
||||
DJANGO_DB_ENGINE=django.db.backends.postgresql
|
||||
DJANGO_DB_DATABASE=${PG_DB_NAME}
|
||||
DJANGO_DB_USER=${PG_DB_USER}
|
||||
DJANGO_DB_PASSWORD=${PG_DB_PASS}
|
||||
DJANGO_DB_HOST=localhost
|
||||
DJANGO_DB_PORT=5432
|
||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
||||
|
||||
DJANGO_MEDIA_ROOT=/opt/wger/media
|
||||
DJANGO_STATIC_ROOT=/opt/wger/static
|
||||
DJANGO_STATIC_URL=/static/
|
||||
|
||||
ALLOWED_HOSTS=${LOCAL_IP},localhost,127.0.0.1
|
||||
CSRF_TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
|
||||
|
||||
USE_X_FORWARDED_HOST=True
|
||||
SECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,http
|
||||
|
||||
DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
|
||||
DJANGO_CACHE_LOCATION=redis://127.0.0.1:6379/1
|
||||
DJANGO_CACHE_TIMEOUT=300
|
||||
DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
|
||||
AXES_CACHE_ALIAS=default
|
||||
|
||||
USE_CELERY=True
|
||||
CELERY_BROKER=redis://127.0.0.1:6379/2
|
||||
CELERY_BACKEND=redis://127.0.0.1:6379/2
|
||||
|
||||
SITE_URL=http://${LOCAL_IP}:3000
|
||||
SECRET_KEY=${SECRET_KEY}
|
||||
EOF
|
||||
set -a && source /opt/wger/.env && set +a
|
||||
$STD uv run wger bootstrap
|
||||
$STD uv run python manage.py collectstatic --no-input
|
||||
cat <<EOF | uv run python manage.py shell
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
|
||||
user, created = User.objects.get_or_create(
|
||||
username="admin",
|
||||
defaults={"email": "admin@localhost"},
|
||||
)
|
||||
|
||||
if created:
|
||||
user.set_password("${PG_DB_PASS}")
|
||||
user.is_superuser = True
|
||||
user.is_staff = True
|
||||
user.save()
|
||||
EOF
|
||||
msg_ok "Set up wger"
|
||||
msg_info "Creating Config and Services"
|
||||
cat <<EOF >/etc/systemd/system/wger.service
|
||||
[Unit]
|
||||
Description=wger Gunicorn
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
WorkingDirectory=/opt/wger
|
||||
EnvironmentFile=/opt/wger/.env
|
||||
ExecStart=/opt/wger/.venv/bin/gunicorn \
|
||||
--bind 127.0.0.1:8000 \
|
||||
--workers 3 \
|
||||
--threads 2 \
|
||||
--timeout 120 \
|
||||
wger.wsgi:application
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/celery.service
|
||||
[Unit]
|
||||
Description=wger Celery Worker
|
||||
After=network.target redis-server.service
|
||||
Requires=redis-server.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/wger
|
||||
EnvironmentFile=/opt/wger/.env
|
||||
ExecStart=/opt/wger/.venv/bin/celery -A wger worker -l info
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
mkdir -p /var/lib/wger/celery
|
||||
chmod 700 /var/lib/wger/celery
|
||||
cat <<EOF >/etc/systemd/system/celery-beat.service
|
||||
[Unit]
|
||||
Description=wger Celery Beat
|
||||
After=network.target redis-server.service
|
||||
Requires=redis-server.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/wger
|
||||
EnvironmentFile=/opt/wger/.env
|
||||
ExecStart=/opt/wger/.venv/bin/celery -A wger beat -l info \
|
||||
--schedule /var/lib/wger/celery/celerybeat-schedule
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<'EOF' >/etc/nginx/sites-available/wger
|
||||
server {
|
||||
listen 3000;
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 20M;
|
||||
|
||||
location /static/ {
|
||||
alias /opt/wger/static/;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /opt/wger/media/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
$STD rm -f /etc/nginx/sites-enabled/default
|
||||
$STD ln -sf /etc/nginx/sites-available/wger /etc/nginx/sites-enabled/wger
|
||||
systemctl enable -q --now redis-server nginx wger celery celery-beat
|
||||
systemctl restart nginx
|
||||
msg_ok "Created Config and Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
+15
-13
@@ -1270,6 +1270,9 @@ load_vars_file() {
|
||||
var_sdn_vnet)
|
||||
if [[ -n "$var_val" ]] && ! validate_sdn_vnet "$var_val"; then
|
||||
msg_warn "SDN vnet '$var_val' from $file not found, ignoring"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
var_http_proxy)
|
||||
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^https?://[^[:space:]]+(:[0-9]+)?/?$ ]]; then
|
||||
msg_warn "Invalid HTTP proxy URL '$var_val' in $file, ignoring"
|
||||
@@ -3749,7 +3752,6 @@ run_addon_updates() {
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
runtime_script_status_guard() {
|
||||
local script_slug="${SCRIPT_SLUG:-${NSAPP:-}}"
|
||||
script_slug="$(echo "$script_slug" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
|
||||
@@ -5634,10 +5636,10 @@ check_storage_health() {
|
||||
|
||||
[[ -z "$total_kb" || "$total_kb" == "0" || -z "$avail_kb" ]] && return 0
|
||||
|
||||
used_pct=$(( (total_kb - avail_kb) * 100 / total_kb ))
|
||||
used_pct=$(((total_kb - avail_kb) * 100 / total_kb))
|
||||
free_gb_fmt=$(numfmt --to=iec --from-unit=1024 --suffix=B --format %.1f "$avail_kb" 2>/dev/null || echo "${avail_kb}KB")
|
||||
|
||||
if (( used_pct >= 95 )); then
|
||||
if ((used_pct >= 95)); then
|
||||
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
||||
if ! is_unattended && command -v whiptail >/dev/null 2>&1 && [[ -t 0 ]]; then
|
||||
if ! whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||
@@ -5646,11 +5648,11 @@ check_storage_health() {
|
||||
msg_error "Installation cancelled – storage nearly full"
|
||||
exit 214
|
||||
fi
|
||||
elif (( used_pct >= 98 )); then
|
||||
elif ((used_pct >= 98)); then
|
||||
msg_error "Storage '${storage}' is ${used_pct}% full – refusing install in unattended mode"
|
||||
exit 214
|
||||
fi
|
||||
elif (( used_pct >= 85 )); then
|
||||
elif ((used_pct >= 85)); then
|
||||
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
||||
fi
|
||||
|
||||
@@ -5989,17 +5991,17 @@ create_lxc_container() {
|
||||
# Maps OS type + version to the release variant name used by ARM64 template sources.
|
||||
arm64_template_variant() {
|
||||
case "$1:$2" in
|
||||
debian:12) echo "bookworm" ;;
|
||||
debian:13) echo "trixie" ;;
|
||||
debian:) echo "$DEBIAN_DEFAULT_CODENAME" ;;
|
||||
debian:12) echo "bookworm" ;;
|
||||
debian:13) echo "trixie" ;;
|
||||
debian:) echo "$DEBIAN_DEFAULT_CODENAME" ;;
|
||||
|
||||
ubuntu:24.04) echo "noble" ;;
|
||||
ubuntu:26.04) echo "questing" ;;
|
||||
ubuntu:) echo "$UBUNTU_DEFAULT_CODENAME" ;;
|
||||
ubuntu:24.04) echo "noble" ;;
|
||||
ubuntu:26.04) echo "questing" ;;
|
||||
ubuntu:) echo "$UBUNTU_DEFAULT_CODENAME" ;;
|
||||
|
||||
alpine:*) echo "${2:-$ALPINE_DEFAULT_VERSION}" ;;
|
||||
alpine:*) echo "${2:-$ALPINE_DEFAULT_VERSION}" ;;
|
||||
|
||||
*) return 1 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user