mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-14 02:33:58 +02:00
Refactor (#10276)
This commit is contained in:
@@ -22,29 +22,12 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
|
PG_DB_NAME="outline" PG_DB_USER="outline" setup_postgresql_db
|
||||||
msg_info "Set up PostgreSQL Database"
|
|
||||||
DB_NAME="outline"
|
|
||||||
DB_USER="outline"
|
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | 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 "Outline-Credentials"
|
|
||||||
echo "Outline Database User: $DB_USER"
|
|
||||||
echo "Outline Database Password: $DB_PASS"
|
|
||||||
echo "Outline Database Name: $DB_NAME"
|
|
||||||
} >>~/outline.creds
|
|
||||||
msg_ok "Set up PostgreSQL Database"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "outline" "outline/outline" "tarball"
|
fetch_and_deploy_gh_release "outline" "outline/outline" "tarball"
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
msg_info "Configuring Outline (Patience)"
|
msg_info "Configuring Outline (Patience)"
|
||||||
SECRET_KEY="$(openssl rand -hex 32)"
|
SECRET_KEY="$(openssl rand -hex 32)"
|
||||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
|
||||||
cd /opt/outline
|
cd /opt/outline
|
||||||
cp .env.sample .env
|
cp .env.sample .env
|
||||||
export NODE_ENV=development
|
export NODE_ENV=development
|
||||||
|
|||||||
Reference in New Issue
Block a user