1.9 KiB
1.9 KiB
Database Setup Required
Issue
The deployment script is failing at the database connection step because the database user or database doesn't exist.
Solution
Option 1: Run Database Setup Script (Recommended)
cd ~/projects/proxmox/explorer-monorepo
sudo bash scripts/setup-database.sh
This will:
- Create the
exploreruser - Create the
explorerdatabase - Set password to
L@ker$2010 - Grant all necessary privileges
Option 2: Manual Setup
# Connect as postgres superuser
sudo -u postgres psql
# Then run these commands:
CREATE USER explorer WITH PASSWORD 'L@ker$2010';
CREATE DATABASE explorer OWNER explorer;
GRANT ALL PRIVILEGES ON DATABASE explorer TO explorer;
\q
# Test connection
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
Option 3: Check Existing Setup
# Check if user exists
sudo -u postgres psql -c "\du" | grep explorer
# Check if database exists
sudo -u postgres psql -c "\l" | grep explorer
# Check PostgreSQL is running
systemctl status postgresql
After Setup
Once the database is set up, run the deployment script again:
cd ~/projects/proxmox/explorer-monorepo
bash EXECUTE_DEPLOYMENT.sh
Troubleshooting
If PostgreSQL is not running:
sudo systemctl start postgresql
sudo systemctl enable postgresql
If user exists but password is wrong:
sudo -u postgres psql -c "ALTER USER explorer WITH PASSWORD 'L@ker\$2010';"
If database exists but user doesn't have access:
sudo -u postgres psql -d explorer -c "GRANT ALL PRIVILEGES ON DATABASE explorer TO explorer;"
sudo -u postgres psql -d explorer -c "GRANT ALL ON SCHEMA public TO explorer;"
Quick Fix Command
cd ~/projects/proxmox/explorer-monorepo
sudo bash scripts/setup-database.sh && bash EXECUTE_DEPLOYMENT.sh
This will set up the database and then run the deployment.