Skip to main content
Glama
POSTGRES_FIX.mdโ€ข3.15 kB
# PostgreSQL Password Fix - Implementation Complete โœ… ## Problem Solved The PostgreSQL password authentication issue has been fixed. The dashboard can now connect to the database properly. ## What Was Fixed 1. **Password Handling in Code** - Fixed `dashboard-server.js` to ensure password is always a string - Fixed `postgres.ts` to properly convert password to string - Added default password fallback 2. **Startup Scripts Created** - `start-services.sh` - Complete service startup script - `run-dashboard.sh` - Simple dashboard wrapper 3. **Configuration** - Default password: `bugbounty123` - Environment variables properly set ## How to Use ### Option 1: Use the Startup Script (Recommended) ```bash ./start-services.sh ``` This script will: - Start PostgreSQL container - Wait for it to be ready - Initialize the database - Start the dashboard server - Verify everything is working ### Option 2: Manual Steps ```bash # 1. Start PostgreSQL POSTGRES_PASSWORD=bugbounty123 docker-compose up -d postgres sleep 10 # 2. Initialize database POSTGRES_PASSWORD=bugbounty123 node init-db.js # 3. Start dashboard pkill -f dashboard-server.js ./run-dashboard.sh & ``` ### Option 3: Use the Dashboard Wrapper ```bash # For foreground execution ./run-dashboard.sh # For background execution ./run-dashboard.sh & ``` ## Environment Variables The following environment variables are set: - `POSTGRES_PASSWORD=bugbounty123` - `POSTGRES_HOST=localhost` - `POSTGRES_USER=postgres` - `POSTGRES_DB=bugbounty` ## Verify It's Working 1. **Check PostgreSQL:** ```bash docker ps | grep bugbounty-postgres ``` 2. **Check Dashboard:** ```bash curl http://localhost:3000/api/health ``` 3. **Check Database Connection:** ```bash curl http://localhost:3000/api/statistics ``` ## Troubleshooting ### Dashboard shows "Failed to load findings" 1. Make sure PostgreSQL is running: ```bash docker ps | grep postgres ``` 2. Check if database is initialized: ```bash POSTGRES_PASSWORD=bugbounty123 node init-db.js ``` 3. Check dashboard logs: ```bash tail -f dashboard-server.log ``` ### PostgreSQL Container Won't Start 1. Remove old container: ```bash docker rm -f bugbounty-postgres ``` 2. Start fresh: ```bash POSTGRES_PASSWORD=bugbounty123 docker-compose up -d postgres ``` ### Password Still Not Working 1. Make sure environment variables are set: ```bash echo $POSTGRES_PASSWORD ``` 2. Restart dashboard with explicit password: ```bash POSTGRES_PASSWORD=bugbounty123 ./run-dashboard.sh ``` ## Next Steps 1. โœ… PostgreSQL is configured and running 2. โœ… Dashboard connects to database 3. โœ… Database tables are initialized 4. ๐ŸŒ Open dashboard: http://localhost:3000 5. ๐Ÿงช Start testing ZAP functionality ## Default Password The default password is `bugbounty123`. To change it: 1. Update `start-services.sh`: ```bash export POSTGRES_PASSWORD=your_new_password ``` 2. Update `run-dashboard.sh`: ```bash export POSTGRES_PASSWORD=your_new_password ``` 3. Restart services with new password

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/telmon95/VulneraMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server