mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-17 22:25:02 +00:00
fix(pangolin): pin version, drop manual SQL, use upstream migrator
Pangolin updates regularly broke (last: #14147 networkId/defaultNetworkId) because ct/pangolin.sh ran 'drizzle-kit push --force' against the live schema, which prompts interactively when columns look like renames. Pangolin already ships a versioned, idempotent migration runner (server/setup/migrationsSqlite.ts -> dist/migrations.mjs) that the official Docker image executes on every container start via 'npm run start'. Use the same mechanism instead of fighting drizzle-kit: - ct/pangolin.sh: PANGOLIN_VERSION=1.18.2 pin, remove ~80 lines of manual sqlite3 ALTER/CREATE pre-migration hacks, replace 'drizzle-kit push --force' with 'node dist/migrations.mjs'. - install/pangolin-install.sh: pin same PANGOLIN_VERSION, add ExecStartPre=node dist/migrations.mjs to pangolin.service so the DB is migrated automatically on every (re)start, matching Docker semantics. Closes #14147
This commit is contained in:
@@ -22,7 +22,8 @@ $STD apt install -y \
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
fetch_and_deploy_gh_release "pangolin" "fosrl/pangolin" "tarball"
|
||||
PANGOLIN_VERSION="${PANGOLIN_VERSION:-1.18.2}"
|
||||
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_amd64"
|
||||
fetch_and_deploy_gh_release "traefik" "traefik/traefik" "prebuild" "latest" "/usr/bin" "traefik_v*_linux_amd64.tar.gz"
|
||||
|
||||
@@ -204,6 +205,7 @@ User=root
|
||||
Environment=NODE_ENV=production
|
||||
Environment=ENVIRONMENT=prod
|
||||
WorkingDirectory=/opt/pangolin
|
||||
ExecStartPre=/usr/bin/node dist/migrations.mjs
|
||||
ExecStart=/usr/bin/node --enable-source-maps dist/server.mjs
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
Reference in New Issue
Block a user