- Updated branding from "SolaceScanScout" to "Solace" across various files including deployment scripts, API responses, and documentation. - Changed default base URL for Playwright tests and updated security headers to reflect the new branding. - Enhanced README and API documentation to include new authentication endpoints and product access details. This refactor aligns the project branding and improves clarity in the API documentation.
2.7 KiB
2.7 KiB
Quick Deployment Reference
Quick command reference for deploying the platform.
One-Command Setup (Partial)
# Run automated script (sets up container and dependencies)
./deployment/scripts/deploy-lxc.sh
Essential Commands
Container Management
# Create container
pct create 100 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst \
--hostname explorer-prod --memory 16384 --cores 4 --unprivileged 0
# Start/Stop
pct start 100
pct stop 100
pct enter 100
Services
# Start all services
systemctl start explorer-indexer explorer-api solacescanscout-frontend
# Check status
systemctl status explorer-indexer
journalctl -u solacescanscout-frontend -f
journalctl -u explorer-indexer -f
# Restart
systemctl restart explorer-api
Database
# Run migrations
cd /home/explorer/explorer-monorepo/backend
go run database/migrations/migrate.go
# Backup
pg_dump -U explorer explorer | gzip > backup.sql.gz
Nginx
# Test config
nginx -t
# Reload
systemctl reload nginx
# Check logs
tail -f /var/log/nginx/explorer-error.log
Cloudflare Tunnel
# Create tunnel
cloudflared tunnel create explorer-tunnel
# Run tunnel
cloudflared tunnel --config /etc/cloudflared/config.yml run
# Service management
systemctl start cloudflared
systemctl status cloudflared
Health Checks
# API health
curl http://localhost:8080/health
# Frontend
curl http://localhost:3000
# Through Nginx
curl http://localhost/api/health
# Through Cloudflare
curl https://blockscout.defi-oracle.io/api/health
File Locations
- Config:
/home/explorer/explorer-monorepo/.env - Services:
/etc/systemd/system/explorer-*.serviceand/etc/systemd/system/solacescanscout-frontend.service - Nginx:
/etc/nginx/sites-available/explorer - Tunnel:
/etc/cloudflared/config.yml - Logs:
/var/log/explorer/andjournalctl -u explorer-*
Common Issues
Service won't start
journalctl -u explorer-api --since "10 minutes ago"
systemctl restart explorer-api
Database connection failed
sudo -u postgres psql
\c explorer
\dt # List tables
Nginx 502 Bad Gateway
# Check if API is running
curl http://localhost:8080/health
# Check Nginx error log
tail -f /var/log/nginx/explorer-error.log
Cloudflare Tunnel not working
cloudflared tunnel info explorer-tunnel
journalctl -u cloudflared -f
Emergency Rollback
# Stop all services
systemctl stop explorer-indexer explorer-api solacescanscout-frontend
# Restore from backup
gunzip < backup.sql.gz | psql -U explorer explorer
# Restart services
systemctl start explorer-indexer explorer-api solacescanscout-frontend