Files
Sankofa/api/RUN_SETUP_NOW.md

135 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

# Run Setup Now - Step by Step
## Current Status
✅ All code is implemented and ready
⚠ Database needs to be configured
⚠ PostgreSQL password needs to be set
## Quick Setup (Choose One Method)
### Method 1: Interactive Setup (Easiest)
```bash
cd /home/intlc/projects/Sankofa/api
# This will guide you through database setup
./scripts/manual-db-setup.sh
# Then run the main setup
./scripts/setup-sovereign-stack.sh
```
### Method 2: Manual Database Setup
#### Step 1: Create Database
```bash
# Option A: With sudo
sudo -u postgres createdb sankofa
# Option B: If you have postgres access
createdb -U postgres sankofa
```
#### Step 2: Set PostgreSQL Password
```bash
# Connect to PostgreSQL
sudo -u postgres psql
# Set password (choose a password that's at least 8 characters)
ALTER USER postgres PASSWORD 'dev_sankofa_2024_secure';
\q
```
#### Step 3: Update .env
```bash
cd /home/intlc/projects/Sankofa/api
# Edit .env and set:
# DB_PASSWORD=dev_sankofa_2024_secure
# NODE_ENV=development
nano .env # or your preferred editor
```
#### Step 4: Run Setup
```bash
./scripts/setup-sovereign-stack.sh
```
### Method 3: If You Know Your Current Password
If you already know your PostgreSQL password:
```bash
cd /home/intlc/projects/Sankofa/api
# 1. Update .env with your password
nano .env
# Set: DB_PASSWORD=your_actual_password
# 2. Create database if needed
createdb -U postgres sankofa # or use sudo if needed
# 3. Run setup
./scripts/setup-sovereign-stack.sh
```
## What Will Happen
Once database is configured, the setup will:
1. ✅ Run migration 025 (adds new categories + Phoenix publisher)
2. ✅ Seed all 9 Sovereign Stack services
3. ✅ Create product versions (v1.0.0)
4. ✅ Set up pricing models
5. ✅ Verify everything worked
## Expected Output
After successful setup:
```
✅ Migrations completed
✅ Services seeded
✅ Phoenix publisher found: Phoenix Cloud Services
✅ Found 9 Phoenix services
✅ All 9 expected services found!
✅ Sovereign Stack setup complete!
```
## Troubleshooting
**"Database does not exist"**
```bash
sudo -u postgres createdb sankofa
```
**"Password authentication failed"**
```bash
# Set password
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'your_password';"
# Update .env
nano .env # Set DB_PASSWORD=your_password
```
**"Permission denied"**
- You may need sudo access for database operations
- Or configure PostgreSQL to allow your user
## Next Steps After Setup
1. ✅ Services will be in marketplace
2. ✅ Query via GraphQL API
3. ✅ Access via portal
4. ⏳ Implement full service logic (stubs ready)
---
**Ready to proceed?** Run `./scripts/manual-db-setup.sh` to get started!