mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-30 22:16:02 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b5bc15dac | |||
| be7cac70de | |||
| c8100d228e | |||
| f10eef8243 | |||
| 50b2256b1d | |||
| 1bcc12af82 | |||
| 721667eaf3 | |||
| e9ae1bfde1 | |||
| 84a3138e7e | |||
| e79d37b032 | |||
| a47a425214 | |||
| 6c96d992d6 |
@@ -452,10 +452,22 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- GrayLog: MongoDB update to 8.2.x [@tremor021](https://github.com/tremor021) ([#14114](https://github.com/community-scripts/ProxmoxVE/pull/14114))
|
||||
- Graylog: Better information in the log file [@tremor021](https://github.com/tremor021) ([#14110](https://github.com/community-scripts/ProxmoxVE/pull/14110))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: checkMK [@MickLesk](https://github.com/MickLesk) ([#14105](https://github.com/community-scripts/ProxmoxVE/pull/14105))
|
||||
- PatchMon: Unpin release [@tremor021](https://github.com/tremor021) ([#14097](https://github.com/community-scripts/ProxmoxVE/pull/14097))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: add guidance when storage lacks rootdir support [@MickLesk](https://github.com/MickLesk) ([#14108](https://github.com/community-scripts/ProxmoxVE/pull/14108))
|
||||
|
||||
## 2026-04-28
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
+6
-7
@@ -23,26 +23,25 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /opt/checkmk_version.txt ]]; then
|
||||
if ! command -v omd &>/dev/null; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE=$(curl_with_retry "https://api.github.com/repos/checkmk/checkmk/tags" "-" | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE="${RELEASE%%+*}"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
msg_info "Updating checkmk"
|
||||
$STD omd stop monitoring
|
||||
$STD omd cp monitoring monitoringbackup
|
||||
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
|
||||
$STD apt-get install -y /opt/checkmk.deb
|
||||
curl_with_retry "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb" "/opt/checkmk.deb"
|
||||
$STD apt install -y /opt/checkmk.deb
|
||||
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
|
||||
$STD omd start monitoring
|
||||
$STD omd -f rm monitoringbackup
|
||||
$STD omd cleanup
|
||||
rm -rf /opt/checkmk.deb
|
||||
msg_ok "Updated ${APP}"
|
||||
msg_ok "Updated checkmk"
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ function update_script() {
|
||||
CURRENT_VERSION=$(apt list --installed 2>/dev/null | grep graylog-server | grep -oP '\d+\.\d+\.\d+')
|
||||
|
||||
if dpkg --compare-versions "$CURRENT_VERSION" lt "6.3"; then
|
||||
MONGO_VERSION="8.0" setup_mongodb
|
||||
MONGO_VERSION="8.2" setup_mongodb
|
||||
|
||||
msg_info "Updating Graylog"
|
||||
$STD apt update
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
______ __ ___ __ _ _ __
|
||||
/_ __/_ __/ /_ ___ / | __________/ /_ (_) __(_)____/ /_
|
||||
/ / / / / / __ \/ _ \ / /| | / ___/ ___/ __ \/ / | / / / ___/ __/
|
||||
/ / / /_/ / /_/ / __/ / ___ |/ / / /__/ / / / /| |/ / (__ ) /_
|
||||
/_/ \__,_/_.___/\___/ /_/ |_/_/ \___/_/ /_/_/ |___/_/____/\__/
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/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://github.com/tubearchivist/tubearchivist
|
||||
|
||||
APP="Tube Archivist"
|
||||
var_tags="${var_tags:-media;youtube;archiving}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-6144}"
|
||||
var_disk="${var_disk:-30}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
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/tubearchivist ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "tubearchivist" "tubearchivist/tubearchivist"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop tubearchivist tubearchivist-celery tubearchivist-beat
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
cp /opt/tubearchivist/.env /opt/tubearchivist_env.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tubearchivist" "tubearchivist/tubearchivist" "tarball" "latest" "/opt/tubearchivist"
|
||||
|
||||
msg_info "Rebuilding Tube Archivist"
|
||||
cd /opt/tubearchivist/frontend
|
||||
$STD npm install
|
||||
$STD npm run build:deploy
|
||||
mkdir -p /opt/tubearchivist/backend/static
|
||||
cp -r /opt/tubearchivist/frontend/dist/* /opt/tubearchivist/backend/static/
|
||||
cp /opt/tubearchivist/docker_assets/backend_start.py /opt/tubearchivist/backend/
|
||||
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python -r /opt/tubearchivist/backend/requirements.txt
|
||||
if [[ -f /opt/tubearchivist/backend/requirements.plugins.txt ]]; then
|
||||
mkdir -p /opt/yt_plugins/bgutil
|
||||
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python --target /opt/yt_plugins/bgutil -r /opt/tubearchivist/backend/requirements.plugins.txt
|
||||
fi
|
||||
msg_ok "Rebuilt Tube Archivist"
|
||||
|
||||
msg_info "Restoring Configuration"
|
||||
mv /opt/tubearchivist_env.bak /opt/tubearchivist/.env
|
||||
sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env
|
||||
sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env
|
||||
sed -i 's|^TA_MEDIA_DIR=/opt/tubearchivist/media$|TA_MEDIA_DIR=/youtube|' /opt/tubearchivist/.env
|
||||
ln -sf /opt/tubearchivist/cache /cache
|
||||
ln -sf /opt/tubearchivist/media /youtube
|
||||
ln -sf /opt/tubearchivist/.env /opt/tubearchivist/backend/.env
|
||||
msg_ok "Restored Configuration"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start tubearchivist tubearchivist-celery tubearchivist-beat
|
||||
systemctl reload nginx
|
||||
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}:8000${CL}"
|
||||
echo -e "${INFO}${YW} Credentials:${CL}"
|
||||
echo -e "${TAB}${BGN}Username: admin${CL}"
|
||||
echo -e "${TAB}${BGN}Password: see ~/tubearchivist.creds${CL}"
|
||||
@@ -14,10 +14,10 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Install Checkmk"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE=$(curl_with_retry "https://api.github.com/repos/checkmk/checkmk/tags" "-" | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE="${RELEASE%%+*}"
|
||||
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
|
||||
$STD apt-get install -y /opt/checkmk.deb
|
||||
curl_with_retry "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb" "/opt/checkmk.deb"
|
||||
$STD apt install -y /opt/checkmk.deb
|
||||
rm -rf /opt/checkmk.deb
|
||||
echo "${RELEASE}" >"/opt/checkmk_version.txt"
|
||||
msg_ok "Installed Checkmk"
|
||||
@@ -29,14 +29,12 @@ MKPASSWORD=$(openssl rand -base64 18 | tr -d '/+=' | cut -c1-16)
|
||||
|
||||
echo -e "$MKPASSWORD\n$MKPASSWORD" | su - "$SITE_NAME" -c "cmk-passwd cmkadmin --stdin"
|
||||
$STD omd start "$SITE_NAME"
|
||||
|
||||
{
|
||||
echo "Application-Credentials"
|
||||
echo "Username: cmkadmin"
|
||||
echo "Password: $MKPASSWORD"
|
||||
echo "Site: $SITE_NAME"
|
||||
} >>~/checkmk.creds
|
||||
|
||||
msg_ok "Created Service"
|
||||
|
||||
cleanup_lxc
|
||||
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
MONGO_VERSION="8.0" setup_mongodb
|
||||
MONGO_VERSION="8.2" setup_mongodb
|
||||
|
||||
msg_info "Setup Graylog Data Node"
|
||||
PASSWORD_SECRET=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16)
|
||||
@@ -38,6 +38,8 @@ sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/s
|
||||
sed -i "s/root_password_sha2 =/root_password_sha2 = $ROOT_PASSWORD/g" /etc/graylog/server/server.conf
|
||||
sed -i 's/#http_bind_address = 127.0.0.1.*/http_bind_address = 0.0.0.0:9000/g' /etc/graylog/server/server.conf
|
||||
systemctl enable -q --now graylog-server
|
||||
sleep 5
|
||||
sed -i "s/0\.0\.0\.0:9000/$LOCAL_IP:9000/g" /var/log/graylog-server/server.log
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
#!/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/tubearchivist/tubearchivist
|
||||
|
||||
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 \
|
||||
git \
|
||||
nginx \
|
||||
redis-server \
|
||||
atomicparsley \
|
||||
python3-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libssl-dev \
|
||||
sqlite3 \
|
||||
ffmpeg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
UV_PYTHON="3.13" setup_uv
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-x86_64-unknown-linux-gnu.zip"
|
||||
|
||||
msg_info "Installing ElasticSearch"
|
||||
setup_deb822_repo \
|
||||
"elastic-8.x" \
|
||||
"https://artifacts.elastic.co/GPG-KEY-elasticsearch" \
|
||||
"https://artifacts.elastic.co/packages/8.x/apt" \
|
||||
"stable" \
|
||||
"main"
|
||||
ES_JAVA_OPTS="-Xms1g -Xmx1g" $STD apt install -y elasticsearch
|
||||
msg_ok "Installed ElasticSearch"
|
||||
|
||||
msg_info "Configuring ElasticSearch"
|
||||
cat <<EOF >/etc/elasticsearch/elasticsearch.yml
|
||||
cluster.name: tubearchivist
|
||||
path.data: /var/lib/elasticsearch
|
||||
path.logs: /var/log/elasticsearch
|
||||
path.repo: ["/var/lib/elasticsearch/snapshot"]
|
||||
network.host: 127.0.0.1
|
||||
xpack.security.enabled: false
|
||||
xpack.security.transport.ssl.enabled: false
|
||||
xpack.security.http.ssl.enabled: false
|
||||
EOF
|
||||
mkdir -p /var/lib/elasticsearch/snapshot
|
||||
chown -R elasticsearch:elasticsearch /var/lib/elasticsearch/snapshot
|
||||
cat <<EOF >/etc/elasticsearch/jvm.options.d/heap.options
|
||||
-Xms1g
|
||||
-Xmx1g
|
||||
EOF
|
||||
sysctl -w vm.max_map_count=262144 2>/dev/null || true
|
||||
cat <<EOF >/etc/sysctl.d/99-elasticsearch.conf
|
||||
vm.max_map_count=262144
|
||||
EOF
|
||||
systemctl enable -q --now elasticsearch
|
||||
msg_ok "Configured ElasticSearch"
|
||||
|
||||
fetch_and_deploy_gh_release "tubearchivist" "tubearchivist/tubearchivist" "tarball" "latest" "/opt/tubearchivist"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/tubearchivist/frontend
|
||||
$STD npm install
|
||||
$STD npm run build:deploy
|
||||
mkdir -p /opt/tubearchivist/backend/static
|
||||
cp -r /opt/tubearchivist/frontend/dist/* /opt/tubearchivist/backend/static/
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Setting up Tube Archivist"
|
||||
cp /opt/tubearchivist/docker_assets/backend_start.py /opt/tubearchivist/backend/
|
||||
$STD uv venv /opt/tubearchivist/.venv
|
||||
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python -r /opt/tubearchivist/backend/requirements.txt
|
||||
if [[ -f /opt/tubearchivist/backend/requirements.plugins.txt ]]; then
|
||||
mkdir -p /opt/yt_plugins/bgutil
|
||||
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python --target /opt/yt_plugins/bgutil -r /opt/tubearchivist/backend/requirements.plugins.txt
|
||||
fi
|
||||
TA_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
ES_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mkdir -p /opt/tubearchivist/{cache,media}
|
||||
ln -sf /opt/tubearchivist/cache /cache
|
||||
ln -sf /opt/tubearchivist/media /youtube
|
||||
cat <<EOF >/opt/tubearchivist/.env
|
||||
TA_HOST=http://${LOCAL_IP}:8000
|
||||
TA_USERNAME=admin
|
||||
TA_PASSWORD=${TA_PASSWORD}
|
||||
TA_BACKEND_PORT=8080
|
||||
TA_APP_DIR=/opt/tubearchivist/backend
|
||||
TA_CACHE_DIR=/cache
|
||||
TA_MEDIA_DIR=/youtube
|
||||
ES_SNAPSHOT_DIR=/var/lib/elasticsearch/snapshot
|
||||
ELASTIC_PASSWORD=${ES_PASSWORD}
|
||||
REDIS_CON=redis://localhost:6379
|
||||
ES_URL=http://localhost:9200
|
||||
TZ=UTC
|
||||
PYTHONUNBUFFERED=1
|
||||
YTDLP_PLUGIN_DIRS=/opt/yt_plugins
|
||||
EOF
|
||||
{
|
||||
echo "Tube Archivist Credentials"
|
||||
echo "=========================="
|
||||
echo "Username: admin"
|
||||
echo "Password: ${TA_PASSWORD}"
|
||||
echo "Elasticsearch Password: ${ES_PASSWORD}"
|
||||
} >~/tubearchivist.creds
|
||||
systemctl enable -q --now redis-server
|
||||
msg_ok "Set up Tube Archivist"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
sed -i 's/^user www-data;$/user root;/' /etc/nginx/nginx.conf
|
||||
cat <<'EOF' >/etc/nginx/sites-available/default
|
||||
server {
|
||||
listen 8000;
|
||||
|
||||
location = /_auth {
|
||||
internal;
|
||||
proxy_pass http://localhost:8080/api/ping/;
|
||||
proxy_pass_request_body off;
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /cache/videos/ {
|
||||
auth_request /_auth;
|
||||
alias /cache/videos/;
|
||||
}
|
||||
|
||||
location /cache/channels/ {
|
||||
auth_request /_auth;
|
||||
alias /cache/channels/;
|
||||
}
|
||||
|
||||
location /cache/playlists/ {
|
||||
auth_request /_auth;
|
||||
alias /cache/playlists/;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
auth_request /_auth;
|
||||
alias /youtube/;
|
||||
types {
|
||||
text/vtt vtt;
|
||||
}
|
||||
}
|
||||
|
||||
location /youtube/ {
|
||||
auth_request /_auth;
|
||||
alias /youtube/;
|
||||
types {
|
||||
video/mp4 mp4;
|
||||
}
|
||||
}
|
||||
|
||||
location /api {
|
||||
include proxy_params;
|
||||
proxy_pass http://localhost:8080;
|
||||
}
|
||||
|
||||
location /admin {
|
||||
include proxy_params;
|
||||
proxy_pass http://localhost:8080;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
alias /opt/tubearchivist/backend/staticfiles/;
|
||||
}
|
||||
|
||||
root /opt/tubearchivist/backend/static;
|
||||
index index.html;
|
||||
|
||||
location ~* ^/(?!static/|cache/).*\.(?:css|js|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
expires 0;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
expires 0;
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
systemctl enable -q nginx
|
||||
systemctl restart nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<'RUNEOF' >/opt/tubearchivist/backend/run.sh
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cd /opt/tubearchivist/backend
|
||||
set -a
|
||||
source /opt/tubearchivist/.env
|
||||
set +a
|
||||
PYTHON=/opt/tubearchivist/.venv/bin/python
|
||||
|
||||
echo "Waiting for ElasticSearch..."
|
||||
for i in $(seq 1 30); do
|
||||
if curl -sf http://localhost:9200/_cluster/health >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
$PYTHON manage.py migrate
|
||||
$PYTHON manage.py collectstatic --noinput -c
|
||||
$PYTHON manage.py ta_envcheck
|
||||
$PYTHON manage.py ta_connection
|
||||
$PYTHON manage.py ta_startup
|
||||
|
||||
exec $PYTHON backend_start.py
|
||||
RUNEOF
|
||||
chmod +x /opt/tubearchivist/backend/run.sh
|
||||
ln -sf /opt/tubearchivist/.env /opt/tubearchivist/backend/.env
|
||||
cat <<EOF >/etc/systemd/system/tubearchivist.service
|
||||
[Unit]
|
||||
Description=Tube Archivist Backend
|
||||
After=network.target elasticsearch.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/tubearchivist/backend
|
||||
EnvironmentFile=/opt/tubearchivist/.env
|
||||
Environment=PATH=/opt/tubearchivist/.venv/bin:/usr/local/bin:/usr/bin:/bin
|
||||
ExecStart=/opt/tubearchivist/backend/run.sh
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/tubearchivist-celery.service
|
||||
[Unit]
|
||||
Description=Tube Archivist Celery Worker
|
||||
After=tubearchivist.service redis-server.service elasticsearch.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/tubearchivist/backend
|
||||
EnvironmentFile=/opt/tubearchivist/.env
|
||||
Environment=PATH=/opt/tubearchivist/.venv/bin:/usr/local/bin:/usr/bin:/bin
|
||||
ExecStart=/opt/tubearchivist/.venv/bin/celery -A task worker --loglevel=error --concurrency=4 --max-tasks-per-child=5 --max-memory-per-child=150000
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/tubearchivist-beat.service
|
||||
[Unit]
|
||||
Description=Tube Archivist Celery Beat
|
||||
After=tubearchivist.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/tubearchivist/backend
|
||||
EnvironmentFile=/opt/tubearchivist/.env
|
||||
Environment=PATH=/opt/tubearchivist/.venv/bin:/usr/local/bin:/usr/bin:/bin
|
||||
ExecStartPre=/bin/bash -c 'for i in \$(seq 1 60); do sqlite3 /cache/db.sqlite3 "SELECT 1 FROM django_celery_beat_crontabschedule LIMIT 1" 2>/dev/null && exit 0; sleep 2; done; exit 1'
|
||||
ExecStart=/opt/tubearchivist/.venv/bin/celery -A task beat --loglevel=error --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
RuntimeMaxSec=3600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now tubearchivist tubearchivist-celery tubearchivist-beat
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -5678,6 +5678,10 @@ create_lxc_container() {
|
||||
|
||||
if ! pvesm status -content rootdir 2>/dev/null | awk 'NR>1{print $1}' | grep -qx "$CONTAINER_STORAGE"; then
|
||||
msg_error "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) does not support 'rootdir' content."
|
||||
msg_custom "💡" "${YW}" "Enable 'Disk image' (rootdir) for storage '${CONTAINER_STORAGE}' in:"
|
||||
msg_custom " " "${YW}" "Datacenter → Storage → ${CONTAINER_STORAGE} → Edit → Content"
|
||||
msg_custom "📖" "${YW}" "See: https://pve.proxmox.com/wiki/Storage"
|
||||
msg_custom "🔗" "${YW}" "Help: https://github.com/community-scripts/ProxmoxVE/discussions"
|
||||
exit 213
|
||||
fi
|
||||
msg_ok "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) validated"
|
||||
|
||||
Reference in New Issue
Block a user