test
This commit is contained in:
parent
36d60b30ac
commit
36ca21848f
@ -1,42 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://alpinelinux.org/
|
|
||||||
|
|
||||||
APP="Alpine-Traefik"
|
|
||||||
var_tags="${var_tags:-os;alpine}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-0.5}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.21}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk update
|
|
||||||
$STD apk upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Upgrading traefik from edge"
|
|
||||||
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Upgraded traefik"
|
|
||||||
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} WebUI Access (if configured) - using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/dashboard${CL}"
|
|
@ -1,56 +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 /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add ca-certificates
|
|
||||||
$STD update-ca-certificates
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Traefik"
|
|
||||||
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Installed Traefik"
|
|
||||||
|
|
||||||
read -p "Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui
|
|
||||||
if [[ "$enable_webui" =~ ^[Yy]$ ]]; then
|
|
||||||
msg_info "Configuring Traefik WebUI"
|
|
||||||
mkdir -p /etc/traefik/config
|
|
||||||
cat <<EOF >/etc/traefik/traefik.yml
|
|
||||||
entryPoints:
|
|
||||||
web:
|
|
||||||
address: ":80"
|
|
||||||
traefik:
|
|
||||||
address: ":8080"
|
|
||||||
|
|
||||||
api:
|
|
||||||
dashboard: true
|
|
||||||
insecure: true
|
|
||||||
|
|
||||||
log:
|
|
||||||
level: INFO
|
|
||||||
|
|
||||||
providers:
|
|
||||||
file:
|
|
||||||
directory: /etc/traefik/config
|
|
||||||
watch: true
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured Traefik WebUI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Enabling and starting Traefik service"
|
|
||||||
$STD rc-update add traefik default
|
|
||||||
$STD rc-service traefik start
|
|
||||||
msg_ok "Traefik service started"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
@ -5,7 +5,7 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
catch_errors
|
||||||
@ -15,7 +15,6 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
mariadb-server \
|
|
||||||
apache2 \
|
apache2 \
|
||||||
cron \
|
cron \
|
||||||
flac \
|
flac \
|
||||||
@ -27,28 +26,21 @@ apt-get install -y \
|
|||||||
wget \
|
wget \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
zip \
|
|
||||||
unzip \
|
|
||||||
sudo \
|
|
||||||
make \
|
make \
|
||||||
mc
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Setting up PHP"
|
|
||||||
sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
|
|
||||||
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y php8.3 php8.3-{bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip}
|
|
||||||
apt-get install -y \
|
|
||||||
libapache2-mod-php \
|
|
||||||
inotify-tools \
|
inotify-tools \
|
||||||
libavcodec-extra \
|
libavcodec-extra \
|
||||||
libev-libevent-dev \
|
libev-libevent-dev \
|
||||||
libmp3lame-dev \
|
libmp3lame-dev \
|
||||||
libtheora-dev \
|
libtheora-dev \
|
||||||
libvorbis-dev \
|
libvorbis-dev \
|
||||||
libvpx-dev
|
libvpx-dev
|
||||||
msg_ok "PHP successfully setup"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
PHP_VERSION=8.4
|
||||||
|
PHP_MODULE=bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip
|
||||||
|
PHP_APACHE=YES
|
||||||
|
install_php
|
||||||
|
install_mariadb
|
||||||
|
|
||||||
msg_info "Setting up Database"
|
msg_info "Setting up Database"
|
||||||
DB_NAME=ampache2
|
DB_NAME=ampache2
|
||||||
@ -66,8 +58,8 @@ msg_ok "Set up database"
|
|||||||
msg_info "Installing Ampache(Patience)"
|
msg_info "Installing Ampache(Patience)"
|
||||||
cd /opt
|
cd /opt
|
||||||
AMPACHE_VERSION=$(wget -q https://github.com/ampache/ampache/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
AMPACHE_VERSION=$(wget -q https://github.com/ampache/ampache/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
wget https://github.com/ampache/ampache/releases/download/${AMPACHE_VERSION}/ampache-${AMPACHE_VERSION}_all_php8.3.zip
|
wget https://github.com/ampache/ampache/releases/download/${AMPACHE_VERSION}/ampache-${AMPACHE_VERSION}_all_php8.4.zip
|
||||||
unzip -q ampache-${AMPACHE_VERSION}_all_php8.3.zip -d ampache
|
unzip -q ampache-${AMPACHE_VERSION}_all_php8.4.zip -d ampache
|
||||||
rm -rf /var/www/html
|
rm -rf /var/www/html
|
||||||
ln -s /opt/ampache/public /var/www/html
|
ln -s /opt/ampache/public /var/www/html
|
||||||
sudo mv /opt/ampache/rest/.htaccess.dist /opt/ampache/rest/.htaccess
|
sudo mv /opt/ampache/rest/.htaccess.dist /opt/ampache/rest/.htaccess
|
||||||
@ -75,11 +67,11 @@ sudo mv /opt/ampache/play/.htaccess.dist /opt/ampache/play/.htaccess
|
|||||||
sudo mv /opt/ampache/channel/.htaccess.dist /opt/ampache/channel/.htaccess
|
sudo mv /opt/ampache/channel/.htaccess.dist /opt/ampache/channel/.htaccess
|
||||||
sudo cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php
|
sudo cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php
|
||||||
sudo chmod 664 /opt/ampache/rest/.htaccess /opt/ampache/play/.htaccess
|
sudo chmod 664 /opt/ampache/rest/.htaccess /opt/ampache/play/.htaccess
|
||||||
sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 50M/' /etc/php/8.3/apache2/php.ini \
|
sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 50M/' /etc/php/8.4/apache2/php.ini &&
|
||||||
&& sudo sed -i 's/post_max_size = .*/post_max_size = 50M/' /etc/php/8.3/apache2/php.ini \
|
sudo sed -i 's/post_max_size = .*/post_max_size = 50M/' /etc/php/8.4/apache2/php.ini &&
|
||||||
&& sudo sed -i 's/max_execution_time = .*/max_execution_time = 300/' /etc/php/8.3/apache2/php.ini \
|
sudo sed -i 's/max_execution_time = .*/max_execution_time = 300/' /etc/php/8.4/apache2/php.ini &&
|
||||||
&& sudo sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php/8.3/apache2/php.ini \
|
sudo sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php/8.4/apache2/php.ini &&
|
||||||
&& sudo systemctl restart apache2
|
sudo systemctl restart apache2
|
||||||
msg_ok "Installed Ampache"
|
msg_ok "Installed Ampache"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user