Add full monorepo: virtual-banker, backend, frontend, docs, scripts, deployment
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
59
FIX_DATABASE_FIRST.md
Normal file
59
FIX_DATABASE_FIRST.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# 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:
|
||||
|
||||
```bash
|
||||
cd ~/projects/proxmox/explorer-monorepo
|
||||
sudo bash scripts/setup-database.sh
|
||||
```
|
||||
|
||||
## What This Does
|
||||
|
||||
1. Creates `explorer` user with password `L@ker$2010`
|
||||
2. Creates `explorer` database
|
||||
3. Grants all necessary privileges
|
||||
4. Tests the connection
|
||||
|
||||
## Then Run Deployment
|
||||
|
||||
After database setup, run:
|
||||
|
||||
```bash
|
||||
bash EXECUTE_DEPLOYMENT.sh
|
||||
```
|
||||
|
||||
## Alternative: Check What Exists
|
||||
|
||||
```bash
|
||||
# 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)
|
||||
|
||||
```bash
|
||||
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`**
|
||||
|
||||
Reference in New Issue
Block a user