Add full monorepo: virtual-banker, backend, frontend, docs, scripts, deployment
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
87
DATABASE_SETUP_NEEDED.md
Normal file
87
DATABASE_SETUP_NEEDED.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# 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)
|
||||
|
||||
```bash
|
||||
cd ~/projects/proxmox/explorer-monorepo
|
||||
sudo bash scripts/setup-database.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
- Create the `explorer` user
|
||||
- Create the `explorer` database
|
||||
- Set password to `***REDACTED-LEGACY-PW***`
|
||||
- Grant all necessary privileges
|
||||
|
||||
### Option 2: Manual Setup
|
||||
|
||||
```bash
|
||||
# Connect as postgres superuser
|
||||
sudo -u postgres psql
|
||||
|
||||
# Then run these commands:
|
||||
CREATE USER explorer WITH PASSWORD '***REDACTED-LEGACY-PW***';
|
||||
CREATE DATABASE explorer OWNER explorer;
|
||||
GRANT ALL PRIVILEGES ON DATABASE explorer TO explorer;
|
||||
\q
|
||||
|
||||
# Test connection
|
||||
PGPASSWORD='***REDACTED-LEGACY-PW***' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
|
||||
```
|
||||
|
||||
### Option 3: Check Existing Setup
|
||||
|
||||
```bash
|
||||
# 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:
|
||||
|
||||
```bash
|
||||
cd ~/projects/proxmox/explorer-monorepo
|
||||
bash EXECUTE_DEPLOYMENT.sh
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### If PostgreSQL is not running:
|
||||
```bash
|
||||
sudo systemctl start postgresql
|
||||
sudo systemctl enable postgresql
|
||||
```
|
||||
|
||||
### If user exists but password is wrong:
|
||||
```bash
|
||||
sudo -u postgres psql -c "ALTER USER explorer WITH PASSWORD '***REDACTED-LEGACY-PW***';"
|
||||
```
|
||||
|
||||
### If database exists but user doesn't have access:
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user