Remove stale Postgres references after SQLite cutover.

Drop .pgpass handling, Postgres ownership repairs, and the docker db
container viewability rules. Update comments and pi-gen map docs for
SQLite/PMTiles. Help submodule documents the new database layout.
This commit is contained in:
Roland 2026-07-18 13:19:26 -06:00
parent 698e61be34
commit 4cafb9f00e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
12 changed files with 23 additions and 40 deletions

View file

@ -62,10 +62,8 @@ rm -f /etc/apache2/conf-available/mod_tile.conf
rm -f /etc/apache2/sites-available/000-default.conf
rm -rf /etc/systemd/system/postgresql@15-map.service.d
rm -f /var/www/html/leaflet.js /var/www/html/leaflet.css
# Remove old .pgpass entry for the map database.
if [ -f /home/wrolpi/.pgpass ]; then
sed -i '/5433/d' /home/wrolpi/.pgpass
fi
# Remove legacy Postgres client credentials (no longer used).
rm -f /home/wrolpi/.pgpass
# --- Step 5: Update wrolpi.target to remove old services ---

View file

@ -102,14 +102,17 @@ find /opt/wrolpi/venv -name "*.pyc" -delete 2>/dev/null || :
echo "WARNING: db upgrade failed (media directory unavailable?); the API will retry at startup."
# WROLPi now uses SQLite (inside the media directory); stop and disable PostgreSQL to free
# system resources. The old Postgres data is NOT deleted -- to get it back:
# sudo systemctl enable --now postgresql
# system resources on upgrades from older installs. The old Postgres data is NOT deleted --
# to get it back temporarily: sudo systemctl enable --now postgresql
# To reclaim disk later: sudo apt-get remove --purge postgresql*
if id postgres >/dev/null 2>&1; then
echo "Disabling PostgreSQL; WROLPi now uses SQLite. Your old Postgres data is untouched."
# Stop the umbrella and any per-cluster instances (postgresql@15-main, etc.).
systemctl stop 'postgresql*' 2>/dev/null || :
systemctl disable postgresql 2>/dev/null || :
fi
# Remove legacy Postgres client credentials (no longer used).
rm -f /home/wrolpi/.pgpass
# Upgrade WROLPi Help.
/opt/wrolpi/scripts/install_help_service.sh || echo "Help install failed."