mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-26 03:35:54 +00:00
Merge branch 'main' into pr-keycloak
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://syncthing.net/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setup Syncthing"
|
||||
$STD apk add --no-cache syncthing
|
||||
msg_ok "Setup Syncthing"
|
||||
|
||||
msg_info "Enabling Syncthing Service"
|
||||
$STD rc-update add syncthing default
|
||||
msg_ok "Enabled Syncthing Service"
|
||||
|
||||
msg_info "Starting Syncthing"
|
||||
$STD rc-service syncthing start
|
||||
msg_ok "Started Syncthing"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
69
install/alpine-teamspeak-server-install.sh
Normal file
69
install/alpine-teamspeak-server-install.sh
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: tremor021 (Slaviša Arežina)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://teamspeak.com/en/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing dependencies"
|
||||
$STD apk add --no-cache \
|
||||
ca-certificates \
|
||||
libstdc++ \
|
||||
libc6-compat
|
||||
msg_ok "Installed dependencies"
|
||||
|
||||
RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n 's/.*teamspeak3-server_linux_amd64-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p' | head -1)
|
||||
|
||||
msg_info "Installing Teamspeak Server v${RELEASE}"
|
||||
mkdir -p /opt/teamspeak-server
|
||||
cd /opt/teamspeak-server
|
||||
curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2
|
||||
tar xf ts3server.tar.bz2 --strip-components=1
|
||||
mkdir -p logs data lib
|
||||
mv *.so lib
|
||||
touch data/ts3server.sqlitedb data/query_ip_blacklist.txt data/query_ip_whitelist.txt .ts3server_license_accepted
|
||||
echo "${RELEASE}" >~/.teamspeak-server
|
||||
msg_ok "Installed TeamSpeak Server v${RELEASE}"
|
||||
|
||||
msg_info "Enabling TeamSpeak Server Service"
|
||||
cat <<EOF >/etc/init.d/teamspeak
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="TeamSpeak Server"
|
||||
description="TeamSpeak 3 Server"
|
||||
command="/opt/teamspeak-server/ts3server_startscript.sh"
|
||||
command_args="start"
|
||||
output_log="/var/log/teamspeak.out.log"
|
||||
error_log="/var/log/teamspeak.err.log"
|
||||
command_background=true
|
||||
pidfile="/run/teamspeak-server.pid"
|
||||
directory="/opt/teamspeak-server"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns
|
||||
}
|
||||
EOF
|
||||
chmod +x /etc/init.d/teamspeak
|
||||
$STD rc-update add teamspeak default
|
||||
msg_ok "Enabled TeamSpeak Server Service"
|
||||
|
||||
msg_info "Starting TeamSpeak Server"
|
||||
$STD service teamspeak start
|
||||
msg_ok "Started TeamSpeak Server"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -r ts3server.tar.bz* LICENSE* CHANGELOG doc serverquerydocs tsdns redist
|
||||
$STD apk cache clean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,209 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/karlomikus/bar-assistant
|
||||
# Source: https://github.com/karlomikus/vue-salt-rim
|
||||
# Source: https://www.meilisearch.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-get install -y \
|
||||
composer \
|
||||
redis-server \
|
||||
npm \
|
||||
nginx \
|
||||
lsb-release \
|
||||
libvips \
|
||||
php-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm}
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Configuring PHP"
|
||||
PHPVER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "\n";')
|
||||
sed -i.bak -E 's/^\s*;?\s*ffi\.enable\s*=.*/ffi.enable=true/' /etc/php/${PHPVER}/fpm/php.ini
|
||||
$STD systemctl reload php${PHPVER}-fpm
|
||||
msg_info "configured PHP"
|
||||
|
||||
msg_info "Installing MeiliSearch"
|
||||
cd /opt
|
||||
RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb
|
||||
$STD dpkg -i meilisearch.deb
|
||||
curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml
|
||||
MASTER_KEY=$(openssl rand -base64 12)
|
||||
sed -i \
|
||||
-e 's|^env =.*|env = "production"|' \
|
||||
-e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
|
||||
-e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
|
||||
-e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
|
||||
-e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
|
||||
-e 's|^# no_analytics = true|no_analytics = true|' \
|
||||
-e 's|^http_addr =.*|http_addr = "127.0.0.1:7700"|' \
|
||||
/etc/meilisearch.toml
|
||||
echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt
|
||||
msg_ok "Installed MeiliSearch"
|
||||
|
||||
msg_info "Creating MeiliSearch service"
|
||||
cat <<EOF >/etc/systemd/system/meilisearch.service
|
||||
[Unit]
|
||||
Description=Meilisearch
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now meilisearch
|
||||
msg_ok "Created Service MeiliSearch"
|
||||
|
||||
msg_info "Installing Bar Assistant"
|
||||
RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/karlomikus/bar-assistant/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
cd /opt
|
||||
curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip
|
||||
unzip -q barassistant.zip
|
||||
mv /opt/bar-assistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant
|
||||
cd /opt/bar-assistant
|
||||
cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env
|
||||
MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//')
|
||||
MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//')
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \
|
||||
-e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \
|
||||
-e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \
|
||||
-e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \
|
||||
-e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \
|
||||
/opt/bar-assistant/.env
|
||||
$STD composer install --no-interaction
|
||||
$STD php artisan key:generate
|
||||
touch storage/bar-assistant/database.ba3.sqlite
|
||||
$STD php artisan migrate --force
|
||||
$STD php artisan storage:link
|
||||
$STD php artisan bar:setup-meilisearch
|
||||
$STD php artisan scout:sync-index-settings
|
||||
$STD php artisan config:cache
|
||||
$STD php artisan route:cache
|
||||
$STD php artisan event:cache
|
||||
mkdir /opt/bar-assistant/storage/bar-assistant/uploads/temp
|
||||
chown -R www-data:www-data /opt/bar-assistant
|
||||
echo "${RELEASE_BARASSISTANT}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Bar Assistant"
|
||||
|
||||
msg_info "Installing Salt Rim"
|
||||
RELEASE_SALTRIM=$(curl -s https://api.github.com/repos/karlomikus/vue-salt-rim/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
cd /opt
|
||||
curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELEASE_SALTRIM}.zip" -o saltrim.zip
|
||||
unzip -q saltrim.zip
|
||||
mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim
|
||||
cd /opt/vue-salt-rim
|
||||
cat <<EOF >/opt/vue-salt-rim/public/config.js
|
||||
window.srConfig = {}
|
||||
window.srConfig.API_URL = "http://${LOCAL_IP}/bar"
|
||||
window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}/search"
|
||||
EOF
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt
|
||||
msg_ok "Installed Salt Rim"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/nginx/sites-available/barassistant.conf
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
location /bar/ {
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
}
|
||||
|
||||
location /search/ {
|
||||
proxy_pass http://127.0.0.1:7700/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 127.0.0.1:8080;
|
||||
server_name example.com;
|
||||
root /opt/bar-assistant/public;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ ^/index\.php(/|$) {
|
||||
fastcgi_pass unix:/var/run/php/php$PHPVER-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 127.0.0.1:8081;
|
||||
server_name _;
|
||||
root /opt/vue-salt-rim/dist;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
ln -s /etc/nginx/sites-available/barassistant.conf /etc/nginx/sites-enabled/
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD systemctl reload nginx
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/meilisearch.deb
|
||||
rm -rf "/opt/barassistant.zip"
|
||||
rm -rf "/opt/saltrim.zip"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -17,21 +17,15 @@ msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y gpg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
#setup_mariadb
|
||||
|
||||
#FFMPEG_VERSION="n7.1.1" FFMPEG_TYPE="full" setup_ffmpeg
|
||||
|
||||
#fetch_and_deploy_gh_release "argus" "release-argus/Argus" "singlefile" "latest" "/opt/argus" "Argus-.*linux-amd64"
|
||||
#fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
|
||||
|
||||
#PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
#echo -e "fetching healthchecks"
|
||||
#fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball" "latest" "/opt/healthchecks"
|
||||
# minimal call: fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball"
|
||||
#echo -e "healthchecks done"
|
||||
|
||||
#echo -e "fetching defguard"
|
||||
#fetch_and_deploy_gh_release "defguard" "DefGuard/defguard" "binary" "latest" "/opt/defguard"
|
||||
# minimal call: fetch_and_deploy_gh_release "defguard" "DefGuard/defguard" "binary"
|
||||
#echo -e "defguard done"
|
||||
|
||||
#PHP_VERSION=8.2 PHP_FPM=YES setup_php
|
||||
#setup_composer
|
||||
|
||||
@@ -39,20 +33,9 @@ msg_ok "Installed Dependencies"
|
||||
#NODE_MODULE="pnpm@10.1,yarn"
|
||||
#RELEASE=$(curl_handler -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
#msg_ok "Get Release $RELEASE"
|
||||
#NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
#NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
#PG_VERSION="16" setup_postgresql
|
||||
#MARIADB_VERSION="11.8"
|
||||
#MYSQL_VERSION="8.0"
|
||||
|
||||
#install_mongodb
|
||||
#setup_postgresql
|
||||
#setup_mariadb
|
||||
#install_mysql
|
||||
|
||||
# msg_info "Setup DISTRO env"
|
||||
# DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||
# msg_ok "Setup DISTRO"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
@@ -20,27 +20,24 @@ msg_ok "Setup Functions"
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y \
|
||||
htop \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
default-jdk \
|
||||
apt-transport-https \
|
||||
ghostscript \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-deu \
|
||||
tesseract-ocr-eng \
|
||||
unpaper \
|
||||
unoconv \
|
||||
wkhtmltopdf \
|
||||
ocrmypdf
|
||||
tesseract-ocr
|
||||
#tesseract-ocr-deu \
|
||||
#tesseract-ocr-eng \
|
||||
#unpaper \
|
||||
#unoconv \
|
||||
#wkhtmltopdf \
|
||||
#ocrmypdf
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up PostgreSQL Repository"
|
||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
|
||||
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
|
||||
$STD apt-get update
|
||||
msg_ok "Set up PostgreSQL Repository"
|
||||
|
||||
msg_info "Install/Set up PostgreSQL Database"
|
||||
setup_gs
|
||||
JAVA_VERSION="21" setup_java
|
||||
POSTGRES_VERSION="16" setup_postgresql
|
||||
setup_yq
|
||||
|
||||
msg_info "Set up PostgreSQL Database"
|
||||
$STD apt-get install -y postgresql-16
|
||||
DB_NAME=docspell_db
|
||||
DB_USER=docspell_usr
|
||||
@@ -58,23 +55,15 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||
} >>~/docspell.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
msg_info "Setup Docspell (Patience)"
|
||||
mkdir -p /opt/docspell
|
||||
Docspell=$(curl -fsSL https://github.com/eikek/docspell/releases/latest -o - | grep "title>Release" | cut -d " " -f 5)
|
||||
DocspellDSC=$(curl -fsSL https://github.com/docspell/dsc/releases/latest -o - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
||||
cd /opt
|
||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb -o docspell-joex_${Docspell}_all.deb
|
||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb -o docspell-restserver_${Docspell}_all.deb
|
||||
$STD dpkg -i docspell-*.deb
|
||||
curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC} -o dsc_amd64-musl-${DocspellDSC}
|
||||
mv dsc_amd* dsc
|
||||
chmod +x dsc
|
||||
mv dsc /usr/bin
|
||||
|
||||
fetch_and_deploy_gh_release "docspell-joex" "eikek/docspell" "binary" "latest" "/opt/docspell-joex" "docspell-joex_*all.deb"
|
||||
fetch_and_deploy_gh_release "docspell-restserver" "eikek/docspell" "binary" "latest" "/opt/docspell-restserver" "docspell-restserver_*all.deb"
|
||||
fetch_and_deploy_gh_release "docspell-dsc" "docspell/dsc" "singlefile" "latest" "/usr/bin" "dsc"
|
||||
fetch_and_deploy_gh_release "apache-solr" "apache/solr" "tarball" "latest" "/opt/docspell"
|
||||
|
||||
|
||||
msg_info "Setup Docspell"
|
||||
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
|
||||
curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq
|
||||
chmod +x /usr/bin/yq
|
||||
#JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf"
|
||||
#SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf"
|
||||
sed -i \
|
||||
-e '11s|localhost|'"$LOCAL_IP"'|' \
|
||||
-e '17s|localhost|'"$LOCAL_IP"'|' \
|
||||
@@ -94,27 +83,6 @@ sed -i \
|
||||
-e '358s|password = .*|password = "'"$DB_PASS"'"|' \
|
||||
-e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
|
||||
/usr/share/docspell-restserver/conf/docspell-server.conf
|
||||
|
||||
# sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF"
|
||||
# sed -i -E '/backend\s*\{/,/\}/ {
|
||||
# /jdbc\s*\{/,/\}/ {
|
||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
||||
# }
|
||||
# }' "$SERVER_CONF"
|
||||
# sed -i -E '/postgresql\s*\{/,/\}/ {
|
||||
# /jdbc\s*\{/,/\}/ {
|
||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
||||
# }
|
||||
# }' "$SERVER_CONF"
|
||||
# sed -i -E '/jdbc\s*\{/,/\}/ {
|
||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
||||
# }' "$JOEX_CONF"
|
||||
msg_ok "Setup Docspell"
|
||||
|
||||
msg_info "Setup Apache Solr"
|
||||
|
||||
@@ -134,7 +134,7 @@ msg_info "Installing Coral Object Detection Model (Patience)"
|
||||
cd /opt/frigate
|
||||
export CCACHE_DIR=/root/.ccache
|
||||
export CCACHE_MAXSIZE=2G
|
||||
curl -fsSL https://github.com/libusb/libusb/archive/v1.0.26.zip
|
||||
curl -L -o v1.0.26.zip https://github.com/libusb/libusb/archive/v1.0.26.zip
|
||||
unzip -q v1.0.26.zip
|
||||
rm v1.0.26.zip
|
||||
cd libusb-1.0.26
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: CrazyWolf13
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/arunavo4/gitea-mirror
|
||||
# Source: https://github.com/RayLabsHQ/gitea-mirror
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@@ -28,7 +28,7 @@ ln -sf /opt/bun/bin/bun /usr/local/bin/bun
|
||||
ln -sf /opt/bun/bin/bun /usr/local/bin/bunx
|
||||
msg_ok "Installed Bun"
|
||||
|
||||
fetch_and_deploy_gh_release "gitea-mirror" "arunavo4/gitea-mirror" "tarball" "v3.0.2"
|
||||
fetch_and_deploy_gh_release "gitea-mirror" "RayLabsHQ/gitea-mirror" "tarball" "v3.0.2"
|
||||
|
||||
msg_info "Installing gitea-mirror"
|
||||
cd /opt/gitea-mirror
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://hanko.io/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
|
||||
@@ -15,15 +15,15 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libssl-dev
|
||||
gcc \
|
||||
libpq-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libssl-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 python3-dev python3-pip
|
||||
python3 python3-dev python3-pip
|
||||
$STD pip install --upgrade pip
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
@@ -42,23 +42,25 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8'
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
{
|
||||
echo "healthchecks-Credentials"
|
||||
echo "healthchecks Database User: $DB_USER"
|
||||
echo "healthchecks Database Password: $DB_PASS"
|
||||
echo "healthchecks Database Name: $DB_NAME"
|
||||
echo "healthchecks-Credentials"
|
||||
echo "healthchecks Database User: $DB_USER"
|
||||
echo "healthchecks Database Password: $DB_PASS"
|
||||
echo "healthchecks Database Name: $DB_NAME"
|
||||
} >>~/healthchecks.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
msg_info "Setup healthchecks"
|
||||
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "source"
|
||||
cd /opt/healthchecks
|
||||
mkdir -p /opt/healthchecks/static-collected/
|
||||
$STD uv venv .venv
|
||||
$STD source .venv/bin/activate
|
||||
$STD uv pip install wheel
|
||||
$STD uv pip install gunicorn
|
||||
$STD uv pip install -r requirements.txt
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
cat <<EOF >/opt/healthchecks/.env
|
||||
ALLOWED_HOSTS=0.0.0.0
|
||||
ALLOWED_HOSTS=localhost,127.0.0.1,${LOCAL_IP},healthchecks
|
||||
DB=postgres
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
@@ -68,6 +70,7 @@ DB_PASSWORD=${DB_PASS}
|
||||
DB_CONN_MAX_AGE=0
|
||||
DB_SSLMODE=prefer
|
||||
DB_TARGET_SESSION_ATTRS=read-write
|
||||
DATABASE_URL=postgres://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?sslmode=prefer
|
||||
|
||||
DEFAULT_FROM_EMAIL=healthchecks@example.org
|
||||
EMAIL_HOST=localhost
|
||||
@@ -79,32 +82,25 @@ EMAIL_USE_VERIFICATION=True
|
||||
|
||||
# Django & Healthchecks Konfiguration
|
||||
SECRET_KEY=${SECRET_KEY}
|
||||
DEBUG=False
|
||||
DEBUG=True
|
||||
|
||||
SITE_ROOT=http://${LOCAL_IP}:8000
|
||||
SITE_NAME=MyChecks
|
||||
STATIC_ROOT=/opt/healthchecks/static-collected
|
||||
|
||||
SITE_ROOT=http://0.0.0.0:8000
|
||||
SITE_NAME=Mychecks
|
||||
SITE_ROOT=http://0.0.0.0:8000
|
||||
EOF
|
||||
|
||||
$STD .venv/bin/python3 manage.py makemigrations
|
||||
$STD .venv/bin/python3 manage.py migrate
|
||||
$STD .venv/bin/python3 manage.py migrate --noinput
|
||||
$STD .venv/bin/python3 manage.py collectstatic --noinput
|
||||
|
||||
ADMIN_EMAIL="admin@helper-scripts.local"
|
||||
ADMIN_PASSWORD="$DB_PASS"
|
||||
cat <<EOF | $STD .venv/bin/python3 manage.py shell
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
|
||||
if not User.objects.filter(email="${ADMIN_EMAIL}").exists():
|
||||
u = User.objects.create_superuser(
|
||||
username="${ADMIN_EMAIL}",
|
||||
email="${ADMIN_EMAIL}",
|
||||
password="${ADMIN_PASSWORD}"
|
||||
)
|
||||
u.is_active = True
|
||||
u.is_staff = True
|
||||
u.is_superuser = True
|
||||
u.save()
|
||||
User.objects.create_superuser("${ADMIN_EMAIL}", "${ADMIN_EMAIL}", "${ADMIN_PASSWORD}")
|
||||
EOF
|
||||
msg_ok "Installed healthchecks"
|
||||
|
||||
@@ -117,7 +113,8 @@ After=network.target postgresql.service
|
||||
[Service]
|
||||
WorkingDirectory=/opt/healthchecks/
|
||||
EnvironmentFile=/opt/healthchecks/.env
|
||||
ExecStart=/opt/healthchecks/.venv/bin/gunicorn hc.wsgi:application --bind 0.0.0.0
|
||||
ExecStart=/opt/healthchecks/.venv/bin/gunicorn hc.wsgi:application --bind 127.0.0.1:8000
|
||||
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Florianb63
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://itsm-ng.com/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Installing Repository"
|
||||
curl -fsSL http://deb.itsm-ng.org/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/itsm-ng-keyring.gpg
|
||||
echo "deb http://deb.itsm-ng.org/$(. /etc/os-release && echo "$ID")/ $(. /etc/os-release && echo "$VERSION_CODENAME") main" > /etc/apt/sources.list.d/itsm-ng.list
|
||||
$STD apt update
|
||||
msg_ok "Installed Repository"
|
||||
|
||||
msg_info "Installing ITSM-NG"
|
||||
$STD apt install -y itsm-ng
|
||||
msg_ok "Installed ITSM-NG"
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=itsmng_db
|
||||
DB_USER=itsmng
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mysql mysql
|
||||
mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
|
||||
mariadb -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "ITSM-NG Database Credentials"
|
||||
echo "Database: $DB_NAME"
|
||||
echo "Username: $DB_USER"
|
||||
echo "Password: $DB_PASS"
|
||||
} >>~/itsmng_db.creds
|
||||
msg_ok "Set up database"
|
||||
|
||||
msg_info "Installing ITSM-NG"
|
||||
cd /usr/share/itsm-ng
|
||||
$STD php bin/console db:install --db-name=$DB_NAME --db-user=$DB_USER --db-password=$DB_PASS --no-interaction
|
||||
msg_ok "Installed ITSM-NG"
|
||||
|
||||
msg_info "Configuring webserver"
|
||||
$STD a2dissite 000-default.conf
|
||||
msg_ok "Setup Service"
|
||||
|
||||
msg_info "Setup Cronjob"
|
||||
echo "* * * * * php /usr/share/itsm-ng/front/cron.php" | crontab -
|
||||
msg_ok "Setup Cronjob"
|
||||
|
||||
msg_info "Update PHP Params"
|
||||
PHP_VERSION=$(ls /etc/php/ | grep -E '^[0-9]+\.[0-9]+$' | head -n 1)
|
||||
PHP_INI="/etc/php/$PHP_VERSION/apache2/php.ini"
|
||||
sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 20M/' $PHP_INI
|
||||
sed -i 's/^post_max_size = .*/post_max_size = 20M/' $PHP_INI
|
||||
sed -i 's/^max_execution_time = .*/max_execution_time = 60/' $PHP_INI
|
||||
sed -i 's/^max_input_vars = .*/max_input_vars = 5000/' $PHP_INI
|
||||
sed -i 's/^memory_limit = .*/memory_limit = 256M/' $PHP_INI
|
||||
sed -i 's/^;\?\s*session.cookie_httponly\s*=.*/session.cookie_httponly = On/' $PHP_INI
|
||||
systemctl restart apache2
|
||||
msg_ok "Update PHP Params"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /usr/share/itsm-ng/install
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://jellyfin.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setting Up Hardware Acceleration"
|
||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
$STD adduser $(id -u -n) video
|
||||
$STD adduser $(id -u -n) render
|
||||
fi
|
||||
msg_ok "Set Up Hardware Acceleration"
|
||||
|
||||
msg_info "Installing Jellyfin"
|
||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||
# If the keyring directory is absent, create it
|
||||
if [[ ! -d /etc/apt/keyrings ]]; then
|
||||
mkdir -p /etc/apt/keyrings
|
||||
fi
|
||||
# Download the repository signing key and install it to the keyring directory
|
||||
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg
|
||||
# Install the Deb822 format jellyfin.sources entry
|
||||
cat <<EOF >/etc/apt/sources.list.d/jellyfin.sources
|
||||
Types: deb
|
||||
URIs: https://repo.jellyfin.org/${PCT_OSTYPE}
|
||||
Suites: ${VERSION}
|
||||
Components: main
|
||||
Architectures: amd64
|
||||
Signed-By: /etc/apt/keyrings/jellyfin.gpg
|
||||
EOF
|
||||
# Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5)
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y jellyfin
|
||||
sed -i 's/"MinimumLevel": "Information"/"MinimumLevel": "Error"/g' /etc/jellyfin/logging.json
|
||||
chown -R jellyfin:adm /etc/jellyfin
|
||||
sleep 10
|
||||
systemctl restart jellyfin
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group
|
||||
else
|
||||
sed -i -e 's/^ssl-cert:x:104:$/render:x:104:jellyfin/' -e 's/^render:x:108:jellyfin$/ssl-cert:x:108:/' /etc/group
|
||||
fi
|
||||
msg_ok "Installed Jellyfin"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Casvt/Kapowarr
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y python3-pip
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
setup_uv
|
||||
fetch_and_deploy_gh_release "kapowarr" "Casvt/Kapowarr"
|
||||
|
||||
msg_info "Setup Kapowarr"
|
||||
cd /opt/kapowarr
|
||||
$STD uv venv .venv
|
||||
$STD source .venv/bin/activate
|
||||
$STD uv pip install --upgrade pip
|
||||
$STD uv pip install --no-cache-dir -r requirements.txt
|
||||
msg_ok "Installed Kapowarr"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/kapowarr.service
|
||||
[Unit]
|
||||
Description=Kapowarr Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/kapowarr/
|
||||
ExecStart=/opt/kapowarr/.venv/bin/python3 Kapowarr.py
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now kapowarr
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
85
install/leantime-install.sh
Normal file
85
install/leantime-install.sh
Normal file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Stroopwafe1
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://leantime.io
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PHP_VERSION=8.4 PHP_MODULE="mysql" PHP_APACHE="YES" PHP_FPM="YES" setup_php
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=leantime
|
||||
DB_USER=leantime
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/"$APPLICATION".creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz
|
||||
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
APACHE_LOG_DIR=/var/log/apache2
|
||||
chown -R www-data:www-data "/opt/leantime"
|
||||
chmod -R 750 "/opt/leantime"
|
||||
|
||||
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /opt/leantime/public
|
||||
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml
|
||||
Options +ExecCGI
|
||||
|
||||
<Directory /opt/leantime/>
|
||||
Options FollowSymLinks
|
||||
Require all granted
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
|
||||
<Location />
|
||||
Require all granted
|
||||
</Location>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
EOF
|
||||
|
||||
mv "/opt/leantime/config/sample.env" "/opt/leantime/config/.env"
|
||||
sed -i -e "s|^LEAN_DB_DATABASE.*|LEAN_DB_DATABASE = '$DB_NAME'|" \
|
||||
-e "s|^LEAN_DB_USER.*|LEAN_DB_USER = '$DB_USER'|" \
|
||||
-e "s|^LEAN_DB_PASSWORD.*|LEAN_DB_PASSWORD = '$DB_PASS'|" \
|
||||
-e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \
|
||||
"/opt/leantime/config/.env"
|
||||
|
||||
a2enmod -q proxy_fcgi setenvif rewrite
|
||||
a2enconf -q "php${PHP_VERSION}-fpm"
|
||||
|
||||
sed -i -e "s/^;extension.\(curl\|fileinfo\|gd\|intl\|ldap\|mbstring\|exif\|mysqli\|odbc\|openssl\|pdo_mysql\)/extension=\1/g" "/etc/php/${PHP_VERSION}/apache2/php.ini"
|
||||
|
||||
systemctl restart apache2
|
||||
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Omar Minaya
|
||||
# Author: Omar Minaya | MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://linkstack.org/
|
||||
|
||||
@@ -13,35 +13,21 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing dependencies"
|
||||
$STD apt-get install -y \
|
||||
software-properties-common \
|
||||
ca-certificates \
|
||||
lsb-release \
|
||||
apt-transport-https \
|
||||
apache2
|
||||
unzip
|
||||
msg_ok "Installed dependencies"
|
||||
PHP_VERSION="8.3" PHP_MODULE="sqlite3,mysql,ronny" PHP_APACHE="YES" setup_php
|
||||
fetch_and_deploy_gh_release "linkstack" "linkstackorg/linkstack" "prebuild" "latest" "/var/www/html/linkstack" "linkstack.zip"
|
||||
|
||||
PHP_VERSION="8.2" PHP_MODULE="sqlite3, mysql, fileinfo" PHP_APACHE="YES" install_php
|
||||
|
||||
msg_info "Installing LinkStack"
|
||||
msg_info "Configuring LinkStack"
|
||||
$STD a2enmod rewrite
|
||||
|
||||
ZIP_URL="https://github.com/linkstackorg/linkstack/releases/latest/download/linkstack.zip"
|
||||
ZIP_FILE="/tmp/linkstack.zip"
|
||||
curl -fsSL -o "$ZIP_FILE" "$ZIP_URL"
|
||||
unzip -q "$ZIP_FILE" -d /var/www/html/linkstack
|
||||
chown -R www-data:www-data /var/www/html/linkstack
|
||||
chmod -R 755 /var/www/html/linkstack
|
||||
|
||||
cat <<EOF > /etc/apache2/sites-available/linkstack.conf
|
||||
cat <<EOF >/etc/apache2/sites-available/linkstack.conf
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/linkstack/linkstack
|
||||
DocumentRoot /var/www/html/linkstack
|
||||
ErrorLog /var/log/apache2/linkstack-error.log
|
||||
CustomLog /var/log/apache2/linkstack-access.log combined
|
||||
<Directory /var/www/html/linkstack/linkstack>
|
||||
<Directory /var/www/html/linkstack/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
@@ -51,13 +37,12 @@ EOF
|
||||
$STD a2dissite 000-default.conf
|
||||
$STD a2ensite linkstack.conf
|
||||
$STD systemctl restart apache2
|
||||
msg_ok "Installed LinkStack"
|
||||
msg_ok "Configured LinkStack"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD rm -f "$ZIP_FILE"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
@@ -15,37 +15,34 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
gpg \
|
||||
openssl \
|
||||
redis \
|
||||
libgbm1 \
|
||||
libnss3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libglib2.0-0 \
|
||||
libdbus-1-3 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxi6 \
|
||||
libxtst6 \
|
||||
ca-certificates \
|
||||
libxrandr2 \
|
||||
libasound2 \
|
||||
libxss1 \
|
||||
libxinerama1 \
|
||||
nginx
|
||||
openssl \
|
||||
redis \
|
||||
libgbm1 \
|
||||
libnss3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libglib2.0-0 \
|
||||
libdbus-1-3 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxi6 \
|
||||
libxtst6 \
|
||||
ca-certificates \
|
||||
libxrandr2 \
|
||||
libasound2 \
|
||||
libxss1 \
|
||||
libxinerama1 \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
#configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000"
|
||||
|
||||
PG_VERSION=17 setup_postgresql
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
NODE_VERSION="18" setup_nodejs
|
||||
|
||||
msg_info "Setup Variables"
|
||||
DB_NAME=maxun_db
|
||||
@@ -56,6 +53,7 @@ MINIO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
||||
ENCRYPTION_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
SESSION_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
||||
msg_ok "Set up Variables"
|
||||
|
||||
msg_info "Setup Database"
|
||||
@@ -65,12 +63,13 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8'
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
{
|
||||
echo "Maxun-Credentials"
|
||||
echo "Maxun Database User: $DB_USER"
|
||||
echo "Maxun Database Password: $DB_PASS"
|
||||
echo "Maxun Database Name: $DB_NAME"
|
||||
echo "Maxun JWT Secret: $JWT_SECRET"
|
||||
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
||||
echo "Maxun-Credentials"
|
||||
echo "Maxun Database User: $DB_USER"
|
||||
echo "Maxun Database Password: $DB_PASS"
|
||||
echo "Maxun Database Name: $DB_NAME"
|
||||
echo "Maxun JWT Secret: $JWT_SECRET"
|
||||
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
||||
echo "Maxun Session Secret: $SESSION_SECRET"
|
||||
} >>~/maxun.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
@@ -99,9 +98,9 @@ LimitNOFILE=65536
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "__________________"
|
||||
echo "MinIO Admin User: $MINIO_USER"
|
||||
echo "MinIO Admin Password: $MINIO_PASS"
|
||||
echo "__________________"
|
||||
echo "MinIO Admin User: $MINIO_USER"
|
||||
echo "MinIO Admin Password: $MINIO_PASS"
|
||||
} >>~/maxun.creds
|
||||
cat <<EOF >/etc/default/minio
|
||||
MINIO_ROOT_USER=${MINIO_USER}
|
||||
@@ -110,8 +109,9 @@ EOF
|
||||
systemctl enable -q --now minio
|
||||
msg_ok "Setup MinIO"
|
||||
|
||||
msg_info "Installing Maxun (Patience)"
|
||||
fetch_and_deploy_gh_release "maxun" "getmaxun/maxun" "source"
|
||||
|
||||
msg_info "Installing Maxun (Patience)"
|
||||
cat <<EOF >/opt/maxun/.env
|
||||
NODE_ENV=development
|
||||
JWT_SECRET=${JWT_SECRET}
|
||||
@@ -137,6 +137,7 @@ VITE_BACKEND_URL=http://${LOCAL_IP}:8080
|
||||
VITE_PUBLIC_URL=http://${LOCAL_IP}:5173
|
||||
|
||||
MAXUN_TELEMETRY=false
|
||||
SESSION_SECRET=${SESSION_SECRET}
|
||||
EOF
|
||||
|
||||
cat <<'EOF' >/usr/local/bin/update-env-ip.sh
|
||||
@@ -162,19 +163,27 @@ msg_info "Setting up nginx with CORS Proxy"
|
||||
cat <<'EOF' >/etc/nginx/sites-available/maxun
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# Frontend ausliefern
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~ ^/(api|record|workflow|storage|auth|integration|proxy|api-docs) {
|
||||
proxy_pass http://localhost:8080;
|
||||
proxy_set_header Host $host;
|
||||
# Backend Proxy
|
||||
location ~ ^/(auth|storage|record|workflow|robot|proxy|api-docs|api|webhook)(/|$) {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# CORS
|
||||
add_header Access-Control-Allow-Origin "$http_origin" always;
|
||||
add_header Access-Control-Allow-Credentials true always;
|
||||
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS always;
|
||||
@@ -193,7 +202,6 @@ server {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
ln -sf /etc/nginx/sites-available/maxun /etc/nginx/sites-enabled/maxun
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
msg_ok "nginx with CORS Proxy set up"
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://mealie.io
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y build-essential libpq-dev libwebp-dev libsasl2-dev libldap2-dev libssl-dev git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
#fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball" "latest" "/opt/mealie" - deactivated for now
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
POSTGRES_VERSION="16" setup_postgresql
|
||||
NODE_MODULE="yarn" NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Setup Variables"
|
||||
DB_NAME=mealie_db
|
||||
DB_USER=mealie__user
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
msg_ok "Set up Variables"
|
||||
|
||||
msg_info "Setup Database"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
|
||||
{
|
||||
echo "Mealie-Credentials"
|
||||
echo "Mealie Database User: $DB_USER"
|
||||
echo "Mealie Database Password: $DB_PASS"
|
||||
echo "Mealie Database Name: $DB_NAME"
|
||||
} >>~/mealie.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
msg_info "Get Mealie Repository"
|
||||
cd /opt
|
||||
$STD git clone https://github.com/mealie-recipes/mealie
|
||||
msg_ok "Get Mealie Repository"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
export NUXT_TELEMETRY_DISABLED=1
|
||||
cd /opt/mealie/frontend
|
||||
$STD yarn install --prefer-offline --frozen-lockfile --non-interactive --production=false --network-timeout 1000000
|
||||
$STD yarn generate
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Copying Built Frontend into Backend Package"
|
||||
cp -r /opt/mealie/frontend/dist /opt/mealie/mealie/frontend
|
||||
msg_ok "Copied Frontend"
|
||||
|
||||
msg_info "Preparing Backend (Poetry)"
|
||||
$STD uv venv /opt/mealie/.venv
|
||||
$STD /opt/mealie/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/mealie/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/mealie/.venv/bin/pip install uv
|
||||
cd /opt/mealie
|
||||
$STD /opt/mealie/.venv/bin/uv pip install poetry==2.0.1
|
||||
$STD /opt/mealie/.venv/bin/poetry self add "poetry-plugin-export>=1.9"
|
||||
msg_ok "Prepared Poetry"
|
||||
|
||||
msg_info "Writing Environment File"
|
||||
cat <<EOF >/opt/mealie/mealie.env
|
||||
HOST=0.0.0.0
|
||||
PORT=9000
|
||||
DB_ENGINE=postgres
|
||||
POSTGRES_SERVER=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USER=${DB_USER}
|
||||
POSTGRES_PASSWORD=${DB_PASS}
|
||||
POSTGRES_DB=${DB_NAME}
|
||||
NLTK_DATA=/nltk_data
|
||||
PRODUCTION=true
|
||||
STATIC_FILES=/opt/mealie/frontend/dist
|
||||
EOF
|
||||
msg_ok "Wrote Environment File"
|
||||
|
||||
msg_info "Creating Start Script"
|
||||
cat <<'EOF' >/opt/mealie/start.sh
|
||||
#!/bin/bash
|
||||
set -a
|
||||
source /opt/mealie/mealie.env
|
||||
set +a
|
||||
exec /opt/mealie/.venv/bin/mealie
|
||||
EOF
|
||||
chmod +x /opt/mealie/start.sh
|
||||
msg_ok "Created Start Script"
|
||||
|
||||
msg_info "Building Mealie Backend Wheel"
|
||||
cd /opt/mealie
|
||||
$STD /opt/mealie/.venv/bin/poetry build --output dist
|
||||
|
||||
MEALIE_VERSION=$(/opt/mealie/.venv/bin/poetry version --short)
|
||||
$STD /opt/mealie/.venv/bin/poetry export --only=main --extras=pgsql --output=dist/requirements.txt
|
||||
echo "mealie[pgsql]==$MEALIE_VERSION \\" >>dist/requirements.txt
|
||||
/opt/mealie/.venv/bin/poetry run pip hash dist/mealie-$MEALIE_VERSION*.whl | tail -n1 | tr -d '\n' >>dist/requirements.txt
|
||||
echo " \\" >>dist/requirements.txt
|
||||
/opt/mealie/.venv/bin/poetry run pip hash dist/mealie-$MEALIE_VERSION*.tar.gz | tail -n1 >>dist/requirements.txt
|
||||
msg_ok "Built Wheel + Requirements"
|
||||
|
||||
msg_info "Installing Mealie via uv"
|
||||
cd /opt/mealie
|
||||
/opt/mealie/.venv/bin/uv pip install --require-hashes -r dist/requirements.txt --find-links dist
|
||||
msg_ok "Installed Mealie"
|
||||
|
||||
msg_info "Downloading NLTK Data"
|
||||
mkdir -p /nltk_data/
|
||||
$STD /opt/mealie/.venv/bin/python -m nltk.downloader -d /nltk_data averaged_perceptron_tagger_eng
|
||||
msg_ok "Downloaded NLTK Data"
|
||||
|
||||
msg_info "Set Symbolic Links for Mealie"
|
||||
ln -sf /opt/mealie/.venv/bin/mealie /usr/local/bin/mealie
|
||||
ln -sf /opt/mealie/.venv/bin/poetry /usr/local/bin/poetry
|
||||
msg_ok "Set Symbolic Links"
|
||||
|
||||
msg_info "Creating Systemd Service"
|
||||
cat <<EOF >/etc/systemd/system/mealie.service
|
||||
[Unit]
|
||||
Description=Mealie Backend Server
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
WorkingDirectory=/opt/mealie
|
||||
ExecStart=/opt/mealie/start.sh
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now mealie
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
171
install/nginxproxymanager-install.sh
Normal file
171
install/nginxproxymanager-install.sh
Normal file
@@ -0,0 +1,171 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://nginxproxymanager.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-get update
|
||||
$STD apt-get -y install \
|
||||
ca-certificates \
|
||||
apache2-utils \
|
||||
logrotate \
|
||||
build-essential \
|
||||
jq \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="16" NODE_MODULE="yarn" setup_nodejs
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "latest" "/tmp/nginxproxymanager"
|
||||
|
||||
msg_info "Installing Python Dependencies"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-venv
|
||||
msg_ok "Installed Python Dependencies"
|
||||
|
||||
msg_info "Setting up Certbot Environment"
|
||||
$STD uv venv /opt/certbot
|
||||
$STD uv pip install --python \
|
||||
certbot \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-multi
|
||||
msg_ok "Certbot Environment Ready"
|
||||
|
||||
msg_info "Installing Openresty"
|
||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||
curl -fsSL "https://openresty.org/package/pubkey.gpg" | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg
|
||||
echo -e "deb http://openresty.org/package/debian $VERSION openresty" >/etc/apt/sources.list.d/openresty.list
|
||||
$STD apt-get update
|
||||
$STD apt-get -y install openresty
|
||||
msg_ok "Installed Openresty"
|
||||
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /opt/certbot/bin/certbot /usr/bin/certbot
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
sed -i 's+^daemon+#daemon+g' /tmp/nginxproxymanager/docker/rootfs/etc/nginx/nginx.conf
|
||||
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
|
||||
for NGINX_CONF in $NGINX_CONFS; do
|
||||
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
|
||||
done
|
||||
|
||||
mkdir -p /var/www/html /etc/nginx/logs
|
||||
cd /tmp/nginxproxymanager
|
||||
cp -r docker/rootfs/var/www/html/* /var/www/html/
|
||||
cp -r docker/rootfs/etc/nginx/* /etc/nginx/
|
||||
cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini
|
||||
cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager
|
||||
ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf
|
||||
rm -f /etc/nginx/conf.d/dev.conf
|
||||
|
||||
mkdir -p /tmp/nginx/body \
|
||||
/run/nginx \
|
||||
/data/nginx \
|
||||
/data/custom_ssl \
|
||||
/data/logs \
|
||||
/data/access \
|
||||
/data/nginx/default_host \
|
||||
/data/nginx/default_www \
|
||||
/data/nginx/proxy_host \
|
||||
/data/nginx/redirection_host \
|
||||
/data/nginx/stream \
|
||||
/data/nginx/dead_host \
|
||||
/data/nginx/temp \
|
||||
/var/lib/nginx/cache/public \
|
||||
/var/lib/nginx/cache/private \
|
||||
/var/cache/nginx/proxy_temp
|
||||
|
||||
chmod -R 777 /var/cache/nginx
|
||||
chown root /tmp/nginx
|
||||
|
||||
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf
|
||||
|
||||
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then
|
||||
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null
|
||||
fi
|
||||
|
||||
mkdir -p /app/global /app/frontend/images
|
||||
cd /tmp/nginxproxymanager
|
||||
cp -r backend/* /app
|
||||
cp -r global/* /app/global
|
||||
msg_ok "Set up Environment"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /tmp/nginxproxymanager/frontend
|
||||
$STD yarn install --frozen-lockfile
|
||||
$STD yarn build
|
||||
cp -r dist/* /app/frontend
|
||||
cp -r app-images/* /app/frontend/images
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Initializing Backend"
|
||||
rm -rf /app/config/default.json
|
||||
if [ ! -f /app/config/production.json ]; then
|
||||
cat <<'EOF' >/app/config/production.json
|
||||
{
|
||||
"database": {
|
||||
"engine": "knex-native",
|
||||
"knex": {
|
||||
"client": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/data/database.sqlite"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
cd /app
|
||||
$STD yarn install --production
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/lib/systemd/system/npm.service
|
||||
[Unit]
|
||||
Description=Nginx Proxy Manager
|
||||
After=network.target
|
||||
Wants=openresty.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=NODE_ENV=production
|
||||
Environment=NODE_OPTIONS=--openssl-legacy-provider
|
||||
ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
|
||||
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=1024
|
||||
WorkingDirectory=/app
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Starting Services"
|
||||
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl enable -q --now openresty
|
||||
systemctl enable -q --now npm
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /tmp/*
|
||||
systemctl restart openresty
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,114 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ZoeyVid/NPMplus
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apk add \
|
||||
tzdata \
|
||||
gawk \
|
||||
yq
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Docker & Compose"
|
||||
$STD apk add docker
|
||||
$STD rc-service docker start
|
||||
$STD rc-update add docker default
|
||||
|
||||
get_latest_release() {
|
||||
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||
}
|
||||
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
curl -fsSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
|
||||
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
msg_ok "Installed Docker & Compose"
|
||||
|
||||
msg_info "Fetching NPMplus"
|
||||
cd /opt
|
||||
curl -fsSL "https://raw.githubusercontent.com/ZoeyVid/NPMplus/refs/heads/develop/compose.yaml" -o compose.yaml
|
||||
msg_ok "Fetched NPMplus"
|
||||
|
||||
attempts=0
|
||||
while true; do
|
||||
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
|
||||
if validate_tz "$TZ_INPUT"; then
|
||||
break
|
||||
fi
|
||||
msg_error "Invalid timezone! Please enter a valid TZ identifier."
|
||||
|
||||
attempts=$((attempts + 1))
|
||||
if [[ "$attempts" -ge 3 ]]; then
|
||||
msg_error "Maximum attempts reached. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT
|
||||
|
||||
yq -i "
|
||||
.services.npmplus.environment |=
|
||||
(map(select(. != \"TZ=*\" and . != \"ACME_EMAIL=*\")) +
|
||||
[\"TZ=$TZ_INPUT\", \"ACME_EMAIL=$ACME_EMAIL_INPUT\"])
|
||||
" /opt/compose.yaml
|
||||
|
||||
msg_info "Building and Starting NPMplus (Patience)"
|
||||
$STD docker compose up -d
|
||||
CONTAINER_ID=""
|
||||
for i in {1..60}; do
|
||||
CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
|
||||
if [[ -n "$CONTAINER_ID" ]]; then
|
||||
STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
|
||||
if [[ "$STATUS" == "healthy" ]]; then
|
||||
msg_ok "NPMplus is running and healthy"
|
||||
break
|
||||
elif [[ "$STATUS" == "unhealthy" ]]; then
|
||||
msg_error "NPMplus container is unhealthy! Check logs."
|
||||
docker logs "$CONTAINER_ID"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
[[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
|
||||
done
|
||||
msg_ok "Builded and started NPMplus"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Retrieving Default Login (Patience)"
|
||||
LOGFILE="/tmp/npmplus.log"
|
||||
docker logs "$CONTAINER_ID" &>"$LOGFILE" &
|
||||
|
||||
PASSWORD_FOUND=0
|
||||
for i in {1..60}; do
|
||||
if grep -q "Creating a new user:" "$LOGFILE"; then
|
||||
PASSWORD_LINE=$(grep "Creating a new user:" "$LOGFILE" | head -n1)
|
||||
PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}')
|
||||
if [[ -n "$PASSWORD" ]]; then
|
||||
echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd
|
||||
msg_ok "Saved default login to /opt/.npm_pwd"
|
||||
PASSWORD_FOUND=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
||||
msg_error "Could not retrieve default login after 60 seconds."
|
||||
echo -e "\nYou can manually try:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n"
|
||||
fi
|
||||
|
||||
rm -f "$LOGFILE"
|
||||
56
install/ots-install.sh
Normal file
56
install/ots-install.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/Luzifer/ots
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing OTS"
|
||||
fetch_and_deploy_gh_release "ots" "Luzifer/ots" "prebuild" "latest" "/opt/ots" "ots_linux_amd64.tgz"
|
||||
cat <<EOF >/opt/ots/env
|
||||
LISTEN=0.0.0.0:3000
|
||||
REDIS_URL=redis://127.0.0.1:6379
|
||||
SECRET_EXPIRY=604800
|
||||
STORAGE_TYPE=redis
|
||||
EOF
|
||||
msg_ok "Installed OTS"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/ots.service
|
||||
[Unit]
|
||||
Description=One-Time-Secret Service
|
||||
After=network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/opt/ots/env
|
||||
ExecStart=/opt/ots/ots
|
||||
Restart=Always
|
||||
RestartSecs=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now ots
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
82
install/rybbit-install.sh
Normal file
82
install/rybbit-install.sh
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/rybbit-io/rybbit
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
caddy \
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
setup_clickhouse
|
||||
PG_VERSION=17 setup_postgresql
|
||||
NODE_VERSION="20" NODE_MODULE="next" setup_nodejs
|
||||
|
||||
#sed -i 's|<default_profile>default</default_profile>|<default_profile>read_only</default_profile>|' /etc/clickhouse-server/users.xml
|
||||
#sed -i 's|<default_password></default_password>|<default_password>DISABLED</default_password>|' /etc/clickhouse-server/users.xml
|
||||
|
||||
msg_info "Setting up PostgreSQL Database"
|
||||
DB_NAME=rybbit_db
|
||||
DB_USER=rybbit
|
||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
{
|
||||
echo "Rybbit-Credentials"
|
||||
echo "Rybbit Database User: $DB_USER"
|
||||
echo "Rybbit Database Password: $DB_PASS"
|
||||
echo "Rybbit Database Name: $DB_NAME"
|
||||
} >>~/rybbit.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
fetch_and_deploy_gh_release "rybbit" "rybbit-io/rybbit" "tarball" "latest" "/opt/rybbit"
|
||||
|
||||
cd /opt/rybbit/shared
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
cd /opt/rybbit/server
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
cd /opt/rybbit/client
|
||||
npm ci --legacy-peer-deps
|
||||
npm run build
|
||||
|
||||
mv /opt/rybbit/.env.example /opt/rybbit/.env
|
||||
sed -i "s|^POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" /opt/rybbit/.env
|
||||
sed -i "s|^POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" /opt/rybbit/.env
|
||||
sed -i "s|^POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" /opt/rybbit/.env
|
||||
sed -i "s|^DOMAIN_NAME=.*|DOMAIN_NAME=localhost|g" /opt/rybbit/.env
|
||||
sed -i "s|^BASE_URL=.*|BASE_URL=\"http://localhost\"|g" /opt/rybbit/.env
|
||||
msg_ok "Rybbit Installed"
|
||||
|
||||
msg_info "Setting up Caddy"
|
||||
mkdir -p /etc/caddy
|
||||
cp /opt/rybbit/Caddyfile /etc/caddy/Caddyfile
|
||||
systemctl enable -q --now caddy
|
||||
msg_ok "Caddy Setup"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/saltstack/salt
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
jq
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Salt repo"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public -o /etc/apt/keyrings/salt-archive-keyring.pgp
|
||||
curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources -o /etc/apt/sources.list.d/salt.sources
|
||||
$STD apt-get update
|
||||
msg_ok "Setup Salt repo"
|
||||
|
||||
msg_info "Installing Salt Master"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/saltstack/salt/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
cat <<EOF >/etc/apt/preferences.d/salt-pin-1001
|
||||
Package: salt-*
|
||||
Pin: version ${RELEASE}
|
||||
Pin-Priority: 1001
|
||||
EOF
|
||||
$STD apt-get install -y salt-master
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Salt Master"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
56
install/scraparr-install.sh
Normal file
56
install/scraparr-install.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: JasonGreenC
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/thecfu/scraparr
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Scraparr"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
fetch_and_deploy_gh_release "scrappar" "thecfu/scraparr" "tarball" "latest" "/opt/scraparr"
|
||||
cd /opt/scraparr || exit
|
||||
$STD uv venv /opt/scraparr/.venv
|
||||
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt
|
||||
chmod -R 755 /opt/scraparr
|
||||
mkdir -p /scraparr/config
|
||||
mv /opt/scraparr/config.yaml /scraparr/config/config.yaml
|
||||
chmod -R 755 /scraparr
|
||||
msg_ok "Installed Scraparr"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/scraparr.service
|
||||
[Unit]
|
||||
Description=Scraparr
|
||||
Wants=network-online.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/scraparr/src
|
||||
ExecStart=/opt/scraparr/.venv/bin/python -m scraparr.scraparr
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q --now scraparr
|
||||
msg_ok "Configured Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
74
install/tududi-install.sh
Normal file
74
install/tududi-install.sh
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2025 Community Scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://tududi.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-get install -y sqlite3
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Installing Tududi"
|
||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi"
|
||||
cd /opt/tududi
|
||||
$STD npm install
|
||||
export NODE_ENV=production
|
||||
$STD npm run frontend:build
|
||||
cp -r ./dist ./backend/dist
|
||||
cp -r ./public/locales ./backend/dist/locales
|
||||
cp ./public/favicon.* ./backend/dist
|
||||
msg_ok "Installed Tududi"
|
||||
|
||||
msg_info "Creating config and database"
|
||||
DB_LOCATION="/opt/tududi-db"
|
||||
UPLOAD_DIR="/opt/tududi-uploads"
|
||||
mkdir -p {"$DB_LOCATION","$UPLOAD_DIR"}
|
||||
SECRET="$(openssl rand -hex 64)"
|
||||
sed -e 's/^GOOGLE/# &/' \
|
||||
-e '/TUDUDI_SESSION/s/^# //' \
|
||||
-e '/NODE_ENV/s/^# //' \
|
||||
-e "s/your_session_secret_here/$SECRET/" \
|
||||
-e 's/development/production/' \
|
||||
-e "\$a\DB_FILE=$DB_LOCATION/production.sqlite3" \
|
||||
-e "\$a\UPLOAD_LOCATION=$UPLOAD_DIR" \
|
||||
/opt/tududi/backend/.env.example >/opt/tududi/backend/.env
|
||||
export DB_FILE="$DB_LOCATION/production.sqlite3"
|
||||
$STD npm run db:init
|
||||
msg_ok "Created config and database"
|
||||
|
||||
msg_info "Creating service"
|
||||
cat <<EOF >/etc/systemd/system/tududi.service
|
||||
[Unit]
|
||||
Description=Tududi Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/tududi
|
||||
EnvironmentFile=/opt/tududi/backend/.env
|
||||
ExecStart=/usr/bin/npm run start
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now tududi
|
||||
msg_ok "Created service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
39
install/vikunja-install.sh
Normal file
39
install/vikunja-install.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (Canbiz)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://vikunja.io/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y make
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Vikunja (Patience)"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||
curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o vikunja-$RELEASE-amd64.deb
|
||||
$STD dpkg -i vikunja-$RELEASE-amd64.deb
|
||||
sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml
|
||||
sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml
|
||||
sed -i 's|./files|/etc/vikunja/files|' /etc/vikunja/config.yml
|
||||
systemctl start vikunja.service
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Vikunja"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/vikunja-$RELEASE-amd64.deb
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
136
install/viseron-install.sh
Normal file
136
install/viseron-install.sh
Normal file
@@ -0,0 +1,136 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: jetonr
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/roflcoopter/viseron
|
||||
|
||||
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 Dependencies"
|
||||
$STD apt-get install -y \
|
||||
python3 python3-pip python3-venv \
|
||||
python3-opencv jq \
|
||||
libgl1-mesa-glx libglib2.0-0 \
|
||||
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Python Environment with uv"
|
||||
cd /opt
|
||||
uv venv viseron
|
||||
source viseron/bin/activate
|
||||
uv pip install --upgrade pip setuptools wheel
|
||||
msg_ok "Python Environment Setup (uv)"
|
||||
|
||||
msg_info "Installing Viseron"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/roflcoopter/viseron/releases/latest | jq -r '.tag_name')
|
||||
uv pip install https://github.com/roflcoopter/viseron/archive/refs/tags/${RELEASE}.tar.gz
|
||||
ln -s /opt/viseron/bin/viseron /usr/local/bin/viseron
|
||||
msg_ok "Installed Viseron $RELEASE"
|
||||
|
||||
msg_info "Creating Configuration Directory"
|
||||
mkdir -p /config
|
||||
mkdir -p /config/recordings
|
||||
mkdir -p /config/logs
|
||||
msg_ok "Created Configuration Directory"
|
||||
|
||||
msg_info "Creating Default Configuration"
|
||||
cat <<EOF >/config/viseron.yaml
|
||||
# Viseron Configuration
|
||||
# https://github.com/roflcoopter/viseron
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
level: INFO
|
||||
file: /config/logs/viseron.log
|
||||
|
||||
# Web Interface
|
||||
web:
|
||||
host: 0.0.0.0
|
||||
port: 8888
|
||||
|
||||
# Cameras
|
||||
cameras:
|
||||
# Example camera configuration
|
||||
# camera_name:
|
||||
# host: 192.168.1.100
|
||||
# port: 554
|
||||
# username: admin
|
||||
# password: password
|
||||
# path: /stream
|
||||
# fps: 5
|
||||
# width: 1920
|
||||
# height: 1080
|
||||
|
||||
# Object Detection
|
||||
object_detection:
|
||||
type: opencv
|
||||
confidence: 0.5
|
||||
labels:
|
||||
- person
|
||||
- car
|
||||
- truck
|
||||
- bus
|
||||
- motorcycle
|
||||
- bicycle
|
||||
|
||||
# Recording
|
||||
recording:
|
||||
enabled: true
|
||||
path: /config/recordings
|
||||
max_size: 10GB
|
||||
max_age: 7d
|
||||
|
||||
# Motion Detection
|
||||
motion_detection:
|
||||
enabled: true
|
||||
threshold: 25
|
||||
sensitivity: 0.8
|
||||
EOF
|
||||
msg_ok "Created Default Configuration"
|
||||
|
||||
msg_info "Creating Systemd Service"
|
||||
cat <<EOF >/etc/systemd/system/viseron.service
|
||||
[Unit]
|
||||
Description=Viseron NVR Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/viseron
|
||||
Environment=PATH=/opt/viseron/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
ExecStart=/opt/viseron/bin/viseron --config /config/viseron.yaml
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now viseron
|
||||
msg_ok "Created Systemd Service"
|
||||
|
||||
msg_info "Setting up Hardware Acceleration"
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
fi
|
||||
msg_ok "Hardware Acceleration Configured"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -14,52 +14,46 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
git \
|
||||
unzip \
|
||||
sudo \
|
||||
make \
|
||||
php8.2 \
|
||||
php8.2-{cli,common,bcmath,intl,fpm,tidy,xml,mysql,mbstring,zip,gd,curl} \
|
||||
composer \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
redis \
|
||||
mariadb-server
|
||||
make \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
redis
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="bcmath,bz2,cli,exif,common,curl,tidy,fpm,gd,intl,mbstring,xml,mysql,zip" setup_php
|
||||
setup_composer
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=wallabag_db
|
||||
DB_USER=wallabag
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
|
||||
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Wallabag Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >> ~/wallabag.creds
|
||||
echo "Wallabag Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/wallabag.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"
|
||||
|
||||
msg_info "Installing Wallabag (Patience)"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/wallabag/wallabag/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/wallabag/wallabag/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
mv wallabag-${RELEASE} /opt/wallabag
|
||||
cd /opt/wallabag
|
||||
useradd -d /opt/wallabag -s /bin/bash -M wallabag
|
||||
chown -R wallabag:wallabag /opt/wallabag
|
||||
mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml
|
||||
sed -i \
|
||||
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
||||
-e 's|database_port: ~|database_port: 3306|' \
|
||||
-e 's|database_user: root|database_user: wallabag|' \
|
||||
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
||||
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
||||
/opt/wallabag/app/config/parameters.yml
|
||||
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
||||
-e 's|database_port: ~|database_port: 3306|' \
|
||||
-e 's|database_user: root|database_user: wallabag|' \
|
||||
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
||||
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
||||
/opt/wallabag/app/config/parameters.yml
|
||||
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
sudo -u wallabag make install --no-interaction
|
||||
@@ -72,7 +66,7 @@ msg_info "Setting up Virtual Host"
|
||||
cat <<EOF >/etc/nginx/conf.d/wallabag.conf
|
||||
server {
|
||||
root /opt/wallabag/web;
|
||||
server_name $IPADDRESS;
|
||||
server_name $IPADDRESS;
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to app.php
|
||||
|
||||
Reference in New Issue
Block a user