This commit is contained in:
Slaviša Arežina
2025-08-01 07:24:13 +02:00
committed by GitHub
parent b6bd8a6de4
commit 654bd1f0d5
2 changed files with 12 additions and 21 deletions

View File

@@ -40,14 +40,11 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
} >>~/outline.creds
msg_ok "Set up PostgreSQL Database"
msg_info "Setup Outline (Patience)"
fetch_and_deploy_gh_release "outline" "outline/outline" "tarball"
msg_info "Configuring Outline (Patience)"
SECRET_KEY="$(openssl rand -hex 32)"
temp_file=$(mktemp)
LOCAL_IP="$(hostname -I | awk '{print $1}')"
RELEASE=$(curl -fsSL https://api.github.com/repos/outline/outline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf $temp_file
mv outline-${RELEASE} /opt/outline
cd /opt/outline
cp .env.sample .env
export NODE_ENV=development
@@ -62,8 +59,7 @@ export NODE_OPTIONS="--max-old-space-size=3584"
$STD yarn build
sed -i 's/NODE_ENV=development/NODE_ENV=production/g' /opt/outline/.env
export NODE_ENV=production
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
msg_ok "Setup Outline"
msg_ok "Configured Outline"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/outline.service
@@ -89,7 +85,6 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -rf $temp_file
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"