mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	merge PostgreSQL to tools.func Installer (#4752)
* Update tools.func * Merge PostgreSQL to tools.func Installer
This commit is contained in:
		@@ -25,10 +25,9 @@ $STD apt-get install -y \
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
PG_VERSION="16" PG_MODULES="postgis" install_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Install/Set up PostgreSQL Database"
 | 
			
		||||
$STD apt-get install -y postgresql-16-postgis
 | 
			
		||||
msg_info "Set up PostgreSQL Database"
 | 
			
		||||
DB_NAME="adventurelog_db"
 | 
			
		||||
DB_USER="adventurelog_user"
 | 
			
		||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ $STD apt-get install -y \
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
setup_uv
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
PG_VERSION="16" PG_MODULES="contrib" install_postgresql
 | 
			
		||||
NODE_VERSION="22" install_node_and_modules
 | 
			
		||||
install_go
 | 
			
		||||
 | 
			
		||||
@@ -61,8 +61,7 @@ cat <<EOF >/etc/GeoIP.conf
 | 
			
		||||
EOF
 | 
			
		||||
msg_ok "Installed GeoIP"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PostgreSQL"
 | 
			
		||||
$STD apt-get install -y postgresql-16 postgresql-contrib-16
 | 
			
		||||
msg_info "Setup PostgreSQL Database"
 | 
			
		||||
DB_NAME="authentik"
 | 
			
		||||
DB_USER="authentik"
 | 
			
		||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
 | 
			
		||||
 
 | 
			
		||||
@@ -15,13 +15,14 @@ update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
    postgresql \
 | 
			
		||||
  apache2 \
 | 
			
		||||
  libapache2-mod-php \
 | 
			
		||||
  php-{pgsql,dom}
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL"
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL Database"
 | 
			
		||||
DB_NAME=baikal
 | 
			
		||||
DB_USER=baikal
 | 
			
		||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
 | 
			
		||||
@@ -33,7 +34,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
 | 
			
		||||
  echo "Baikal Database Password: $DB_PASS"
 | 
			
		||||
  echo "Baikal Database Name: $DB_NAME"
 | 
			
		||||
} >>~/baikal.creds
 | 
			
		||||
msg_ok "Set up PostgreSQL"
 | 
			
		||||
msg_ok "Set up PostgreSQL Database"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Baikal"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
 
 | 
			
		||||
@@ -15,12 +15,13 @@ update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  postgresql \
 | 
			
		||||
  apache2 \
 | 
			
		||||
  php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
 | 
			
		||||
  libapache2-mod-php
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL"
 | 
			
		||||
DB_NAME=freshrss
 | 
			
		||||
DB_USER=freshrss
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@ msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  apache2 \
 | 
			
		||||
  redis-server \
 | 
			
		||||
  postgresql \
 | 
			
		||||
  build-essential \
 | 
			
		||||
  libxml2-dev \
 | 
			
		||||
  libxslt1-dev \
 | 
			
		||||
@@ -27,6 +26,8 @@ $STD apt-get install -y \
 | 
			
		||||
  zlib1g-dev
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Python"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3 \
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,6 @@ update_os
 | 
			
		||||
msg_info "Installing Dependencies (Patience)"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  redis \
 | 
			
		||||
  postgresql \
 | 
			
		||||
  build-essential \
 | 
			
		||||
  imagemagick \
 | 
			
		||||
  fonts-liberation \
 | 
			
		||||
@@ -37,6 +36,8 @@ $STD apt-get install -y \
 | 
			
		||||
  libleptonica-dev
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
PG_VERSION="16" install_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Python3"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3 \
 | 
			
		||||
 
 | 
			
		||||
@@ -13,19 +13,7 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y gnupg
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL Repository"
 | 
			
		||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
 | 
			
		||||
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
 | 
			
		||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
 | 
			
		||||
msg_ok "Setup PostgreSQL Repository"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PostgreSQL"
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get install -y postgresql
 | 
			
		||||
PG_VERSION="17" install_postgresql
 | 
			
		||||
 | 
			
		||||
cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
 | 
			
		||||
# PostgreSQL Client Authentication Configuration File
 | 
			
		||||
@@ -127,7 +115,7 @@ default_text_search_config = 'pg_catalog.english'
 | 
			
		||||
include_dir = 'conf.d'                  
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
sudo systemctl restart postgresql
 | 
			
		||||
systemctl restart postgresql
 | 
			
		||||
msg_ok "Installed PostgreSQL"
 | 
			
		||||
 | 
			
		||||
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user