forked from forkanization/Proxmox-arm64
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
+12
-24
@@ -14,23 +14,8 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
postgresql \
|
||||
gpg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g pnpm
|
||||
msg_ok "Installed Node.js"
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
|
||||
PG_VERSION="16" install_postgresql
|
||||
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME=ziplinedb
|
||||
@@ -42,18 +27,20 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO
|
||||
$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 "" >>~/zipline.creds
|
||||
echo -e "Zipline Database User: $DB_USER" >>~/zipline.creds
|
||||
echo -e "Zipline Database Password: $DB_PASS" >>~/zipline.creds
|
||||
echo -e "Zipline Database Name: $DB_NAME" >>~/zipline.creds
|
||||
echo -e "Zipline Secret: $SECRET_KEY" >>~/zipline.creds
|
||||
{
|
||||
echo "Zipline-Credentials"
|
||||
echo "Zipline Database User: $DB_USER"
|
||||
echo "Zipline Database Password: $DB_PASS"
|
||||
echo "Zipline Database Name: $DB_NAME"
|
||||
echo "Zipline Secret Key: $SECRET_KEY"
|
||||
} >>~/zipline.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
msg_info "Installing Zipline (Patience)"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip")
|
||||
unzip -q v"${RELEASE}".zip
|
||||
curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
$STD unzip v"${RELEASE}".zip
|
||||
mv zipline-"${RELEASE}" /opt/zipline
|
||||
cd /opt/zipline
|
||||
cat <<EOF >/opt/zipline/.env
|
||||
@@ -91,6 +78,7 @@ msg_ok "Created Service"
|
||||
motd_ssh
|
||||
customize
|
||||
msg_info "Cleaning up"
|
||||
rm -f /opt/v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
Reference in New Issue
Block a user