Files
solace-bg-dubai/DEPLOYMENT_COMPLETE.md
defiQUG c94eb595f8
Some checks failed
CI / lint-and-test (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:53 -08:00

5.2 KiB

Deployment Complete - Summary

Completed Steps

1. Container Deployment

All containers have been successfully deployed and are running:

  • 3002 (Database) - Running - PostgreSQL at 192.168.11.62
  • 3001 (Backend) - Running - API server at 192.168.11.61
  • 3003 (Indexer) - Running - Event indexer at 192.168.11.63
  • 3000 (Frontend) - Running - Next.js app at 192.168.11.60

2. Database Setup

  • PostgreSQL installed and configured
  • Database solace_treasury created
  • User solace_user created with password
  • Database migrations completed successfully
  • Connection string: postgresql://solace_user:SolaceTreasury2024!@192.168.11.62:5432/solace_treasury

3. Environment Configuration

  • Environment files created from templates
  • Database password configured
  • Chain 138 RPC URLs configured
  • Environment files copied to all containers

4. Services Configuration

  • Systemd services created for all components
  • Services enabled for auto-start
  • Backend service configured (note: backend is placeholder, will need full implementation)

📋 Remaining Steps

1. Deploy Contracts to Chain 138

Prerequisites:

  • Need a valid private key with ETH balance on Chain 138
  • Chain 138 RPC must be accessible

Steps:

cd contracts
# Update contracts/.env with:
# CHAIN138_RPC_URL=http://192.168.11.250:8545
# PRIVATE_KEY=<your_private_key_with_balance>

pnpm install
pnpm run deploy:chain138

This will create contracts/deployments/chain138.json with deployed addresses.

2. Update Environment Files with Contract Addresses

After contract deployment, update the contract addresses:

Frontend (frontend/.env.production):

NEXT_PUBLIC_TREASURY_WALLET_ADDRESS=<deployed_address>
NEXT_PUBLIC_SUB_ACCOUNT_FACTORY_ADDRESS=<deployed_address>
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=<your_project_id>

Backend (backend/.env):

CONTRACT_ADDRESS=<treasury_wallet_address>

Indexer (backend/.env.indexer):

CONTRACT_ADDRESS=<treasury_wallet_address>

Then copy updated files to containers:

scp frontend/.env.production root@192.168.11.10:/tmp/
scp backend/.env root@192.168.11.10:/tmp/
scp backend/.env.indexer root@192.168.11.10:/tmp/

ssh root@192.168.11.10 "pct push 3000 /tmp/.env.production /opt/solace-frontend/.env.production"
ssh root@192.168.11.10 "pct push 3001 /tmp/.env /opt/solace-backend/.env"
ssh root@192.168.11.10 "pct push 3003 /tmp/.env.indexer /opt/solace-indexer/.env.indexer"

3. Complete Backend Implementation

The backend (backend/src/index.ts) is currently a placeholder. You need to:

  1. Implement the API server (Express/Fastify)
  2. Set up API routes
  3. Connect to database
  4. Implement tRPC or REST endpoints

4. Complete Frontend Deployment

The frontend container needs:

  1. Code properly copied (fix deployment script issue)
  2. Dependencies installed
  3. Production build completed
  4. Service started

5. Start All Services

Once everything is configured:

ssh root@192.168.11.10 "
  pct exec 3001 -- systemctl restart solace-backend
  pct exec 3003 -- systemctl restart solace-indexer
  pct exec 3000 -- systemctl restart solace-frontend
"

🔍 Current Status

Containers

VMID  Status   Name    IP Address
3000  running  ml110   192.168.11.60
3001  running  ml110   192.168.11.61
3002  running  ml110   192.168.11.62
3003  running  ml110   192.168.11.63

Services

  • Database: Running and accessible
  • Backend: ⚠️ Service configured but backend code is placeholder
  • Indexer: ⚠️ Service configured, needs contract address
  • Frontend: ⚠️ Container running, needs code deployment completion

Network Access

📝 Notes

  1. Backend Service: Currently exits immediately because backend/src/index.ts is a placeholder. Implement the actual API server to fix this.

  2. Frontend Deployment: The frontend code copy had issues. The deployment script has been fixed, but you may need to manually copy the frontend code or re-run the deployment.

  3. Contract Deployment: Requires a private key with ETH balance on Chain 138. Check the genesis file for pre-funded accounts.

  4. WalletConnect: You'll need to create a WalletConnect project and add the project ID to the frontend environment.

  5. SSL/TLS: For public access, set up Nginx reverse proxy with SSL certificates (see deployment/proxmox/templates/nginx.conf).

🚀 Quick Commands

Check container status:

ssh root@192.168.11.10 "pct list | grep -E '300[0-3]'"

Check service status:

ssh root@192.168.11.10 "pct exec 3001 -- systemctl status solace-backend"

View logs:

ssh root@192.168.11.10 "pct exec 3001 -- journalctl -u solace-backend -f"

Test database connection:

ssh root@192.168.11.10 "pct exec 3001 -- psql -h 192.168.11.62 -U solace_user -d solace_treasury"

Deployment Success!

The infrastructure is deployed and ready. Complete the remaining steps above to have a fully functional DApp on Chain 138.