From 1a5c7680ee40a1929f1c6a4f81887c42620fecb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:28:00 +0100 Subject: [PATCH] Refactor (#10276) --- install/outline-install.sh | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/install/outline-install.sh b/install/outline-install.sh index 476bae274..ff20484bf 100644 --- a/install/outline-install.sh +++ b/install/outline-install.sh @@ -22,29 +22,12 @@ msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs PG_VERSION="16" setup_postgresql - -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" - +PG_DB_NAME="outline" PG_DB_USER="outline" setup_postgresql_db fetch_and_deploy_gh_release "outline" "outline/outline" "tarball" +import_local_ip msg_info "Configuring Outline (Patience)" SECRET_KEY="$(openssl rand -hex 32)" -LOCAL_IP="$(hostname -I | awk '{print $1}')" cd /opt/outline cp .env.sample .env export NODE_ENV=development