bump pangolin to PSQL

This commit is contained in:
MickLesk
2026-07-10 15:33:49 +02:00
parent e3472681c9
commit 5530b426a3
+9 -4
View File
@@ -17,11 +17,12 @@ msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
python3 \
sqlite3 \
iptables
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
PG_VERSION="17" setup_postgresql
PG_DB_NAME="pangolin" PG_DB_USER="pangolin" setup_postgresql_db
PANGOLIN_VERSION="${PANGOLIN_VERSION:-1.20.0}"
fetch_and_deploy_gh_release "pangolin" "fosrl/pangolin" "tarball" "$PANGOLIN_VERSION"
fetch_and_deploy_gh_release "gerbil" "fosrl/gerbil" "singlefile" "latest" "/usr/bin" "gerbil_linux_$(arch_resolve)"
@@ -36,7 +37,7 @@ BADGER_VERSION=$(get_latest_github_release "fosrl/badger" "false")
cd /opt/pangolin
mkdir -p /opt/pangolin/config/{traefik,db,letsencrypt,logs}
$STD npm ci
$STD npm run set:sqlite
$STD npm run set:pg
$STD npm run set:oss
rm -rf server/private
$STD npm run db:generate
@@ -74,6 +75,9 @@ flags:
require_email_verification: false
disable_signup_without_invite: false
disable_user_create_org: false
postgres:
connection_string: "postgresql://pangolin:${PG_DB_PASS}@localhost:5432/pangolin"
EOF
cat <<EOF >/opt/pangolin/config/traefik/traefik_config.yml
@@ -181,7 +185,7 @@ http:
servers:
- url: "http://$LOCAL_IP:3000"
EOF
$STD npm run db:push
$STD ENVIRONMENT=prod node dist/migrations.mjs
. /etc/os-release
if [ "$VERSION_CODENAME" = "trixie" ]; then
@@ -197,7 +201,8 @@ msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/pangolin.service
[Unit]
Description=Pangolin Service
After=network.target
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple