You're running as root user, so DO NOT use sudo - it's not needed and will cause "command not found" errors.
supervisorctl status# Restart everything
supervisorctl restart all
# Restart individual services
supervisorctl restart backend
supervisorctl restart frontend
supervisorctl restart mongodbsupervisorctl stop all
supervisorctl stop backend
supervisorctl stop frontendsupervisorctl start all
supervisorctl start backend
supervisorctl start frontendsupervisorctl reload
# or
supervisorctl reread && supervisorctl update/app/scripts/status.sh# Backend health
curl http://localhost:8001/api/health
# System health
curl http://localhost:8001/api/system-health
# Active seeds
curl http://localhost:8001/api/seeds
# Topology
curl http://localhost:8001/api/topologycurl -X POST http://localhost:8001/api/llm/chat \
-H "Content-Type: application/json" \
-d '{"prompt":"Hello","provider":"openai","model":"gpt-5.2"}'curl http://localhost:8001/api/edcm/analyze# Error logs
tail -f /var/log/supervisor/backend.err.log
# Last 50 lines
tail -50 /var/log/supervisor/backend.err.log
# Output logs
tail -f /var/log/supervisor/backend.out.log# Output logs
tail -f /var/log/supervisor/frontend.out.log
# Last 50 lines
tail -50 /var/log/supervisor/frontend.out.logtail -f /var/log/mongodb/mongod.logtail -f /var/log/supervisor/supervisord.log# Check status
supervisorctl status backend
# View error logs
tail -50 /var/log/supervisor/backend.err.log
# Restart
supervisorctl restart backend# Check if dependencies are installed
cd /app/backend
pip list | grep -E "fastapi|emergent"
# Reinstall dependencies
/app/scripts/install_backend.sh
# Restart
supervisorctl restart backend# Check Node.js
node --version
yarn --version
# Reinstall dependencies
cd /app/frontend
rm -rf node_modules
yarn install
# Restart
supervisorctl restart frontend# Check if running
supervisorctl status mongodb
# Check logs
tail -50 /var/log/mongodb/mongod.log
# Ensure data directory exists
mkdir -p /data/db
# Restart
supervisorctl restart mongodb# Stop all
supervisorctl stop all
# Wait
sleep 3
# Start all
supervisorctl start all
# Check status
supervisorctl statussupervisorctl restart all
sleep 5
/app/scripts/status.sh# System status
/app/scripts/status.sh
# Or use helper
/app/scripts/commands.sh- Dashboard: http://localhost:3000
- Backend API: http://localhost:8001
- API Docs: http://localhost:8001/docs
- Backend:
/app/backend/ - Frontend:
/app/frontend/ - Scripts:
/app/scripts/
- Backend:
/var/log/supervisor/backend.err.log - Frontend:
/var/log/supervisor/frontend.out.log - MongoDB:
/var/log/mongodb/mongod.log
- Supervisor:
/etc/supervisor/conf.d/pcna.conf - Backend env:
/app/backend/.env - Frontend env:
/app/frontend/.env
# Edit code in /app/backend/
# Backend auto-reloads (no restart needed)# Edit code in /app/frontend/src/
# Frontend hot-reloads (no restart needed)cd /app/backend
pip install package-name
# Add to requirements.txt
supervisorctl restart backendcd /app/frontend
yarn add package-name
# package.json auto-updates
supervisorctl restart frontend/app/scripts/commands.sh- No sudo needed - You're root, commands work directly
- Hot reload enabled - Most code changes apply automatically
- Check logs first - When debugging, always check logs
- Use helper scripts -
/app/scripts/has useful tools - Status check - Run
/app/scripts/status.shanytime
supervisorctl restart allsupervisorctl stop all
sleep 5
supervisorctl start all
/app/scripts/status.shsupervisorctl reloadRemember: No sudo needed - you're already root! ✅