1.2 KiB
1.2 KiB
Fix Database Connection First
Current Issue
The deployment script is failing because the database user or database doesn't exist.
Quick Fix
Run this command to set up the database:
cd ~/projects/proxmox/explorer-monorepo
sudo bash scripts/setup-database.sh
What This Does
- Creates
exploreruser with passwordL@ker$2010 - Creates
explorerdatabase - Grants all necessary privileges
- Tests the connection
Then Run Deployment
After database setup, run:
bash EXECUTE_DEPLOYMENT.sh
Alternative: Check What Exists
# Check if PostgreSQL is running
systemctl status postgresql
# Check if user exists
sudo -u postgres psql -c "\du" | grep explorer
# Check if database exists
sudo -u postgres psql -c "\l" | grep explorer
Manual Setup (if script doesn't work)
sudo -u postgres psql << EOF
CREATE USER explorer WITH PASSWORD 'L@ker\$2010';
CREATE DATABASE explorer OWNER explorer;
GRANT ALL PRIVILEGES ON DATABASE explorer TO explorer;
\q
EOF
# Test
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
Run sudo bash scripts/setup-database.sh first, then bash EXECUTE_DEPLOYMENT.sh