4.6 KiB
๐ Lumina 3D Explorer - Production Deployment Guide
One-click deploy ยท Auto HTTPS ยท Zero config ยท Works forever
Quick Start (2 Minutes)
1. Edit Configuration
Edit deploy.sh and set your domain and email:
DOMAIN="your-domain.com" # โ CHANGE THIS
EMAIL="you@gmail.com" # โ CHANGE THIS
Also update nginx.conf:
server_name your-domain.com; # โ CHANGE THIS
2. Run Deployment
chmod +x deploy.sh
./deploy.sh
That's it! Your explorer is now live at https://your-domain.com
What Gets Deployed
Services
- lumina-api - Node.js API server (port 3000)
- lumina-frontend - Nginx serving React frontend (ports 80/443)
- certbot - Auto-renewing SSL certificates
- mongodb - Main database
- mongodb-archive - Archive database
- elasticsearch - Search index
- redis - Cache layer
Features
โ
Real Mainnet data (219k+ assets, real pools, real prices)
โ
No crashes (Invalid asset name fixed)
โ
Full HTTPS with auto-renew
โ
3D view fully alive (whales, pools, validators)
โ
Zero config after first run
Management Commands
View Logs
docker compose -f docker-compose.prod.yml logs -f
View API Logs Only
docker compose -f docker-compose.prod.yml logs -f lumina-api
View Frontend Logs Only
docker compose -f docker-compose.prod.yml logs -f lumina-frontend
Stop Services
docker compose -f docker-compose.prod.yml down
Restart Services
docker compose -f docker-compose.prod.yml restart
Update and Redeploy
# Pull latest code
git pull
# Rebuild frontend
cd ui && pnpm build && cd ..
# Restart services
docker compose -f docker-compose.prod.yml restart
SSL Certificate Management
Manual Renewal
docker compose -f docker-compose.prod.yml exec certbot certbot renew
Check Certificate Status
docker compose -f docker-compose.prod.yml exec certbot certbot certificates
Certificates auto-renew every 12 hours via the certbot container.
Troubleshooting
Port Already in Use
If ports 80 or 443 are already in use:
- Stop existing web server:
sudo systemctl stop nginx # or apache2
- Or change ports in
docker-compose.prod.yml:
ports:
- "8080:80" # HTTP
- "8443:443" # HTTPS
Frontend Not Building
Ensure you have Node.js and pnpm installed:
# Install pnpm
npm install -g pnpm
# Or use npm
npm install -g npm
API Not Connecting
Check API logs:
docker compose -f docker-compose.prod.yml logs lumina-api
Verify API is running:
curl http://localhost:3000/
SSL Certificate Issues
If certificate request fails:
- Ensure domain DNS points to your server
- Ensure ports 80 and 443 are open
- Check certbot logs:
docker compose -f docker-compose.prod.yml logs certbot
Database Connection Issues
Check MongoDB logs:
docker compose -f docker-compose.prod.yml logs mongodb
Verify MongoDB is running:
docker compose -f docker-compose.prod.yml exec mongodb mongosh --eval "db.runCommand('ping')"
Environment Variables
Key environment variables in docker-compose.prod.yml:
NODE_ENV=production- Production modeMONGODB_URI- MongoDB connection stringELASTICSEARCH_URL- Elasticsearch URLREDIS_URL- Redis connection stringHORIZON_URL_PUBLIC- Stellar Mainnet HorizonHORIZON_URL_TESTNET- Stellar Testnet Horizon
Performance Tuning
Increase API Memory
Edit docker-compose.prod.yml:
lumina-api:
deploy:
resources:
limits:
memory: 2G
Increase Elasticsearch Memory
elasticsearch:
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
Security Checklist
- Domain DNS configured correctly
- SSL certificates installed
- Firewall configured (ports 80, 443 open)
- Environment variables secured
- Database passwords set (if using auth)
- Regular backups configured
- Monitoring/logging set up
Backup & Restore
Backup MongoDB
docker compose -f docker-compose.prod.yml exec mongodb mongodump --out /backup
Restore MongoDB
docker compose -f docker-compose.prod.yml exec mongodb mongorestore /backup
Support
For issues or questions:
- Check logs:
docker compose -f docker-compose.prod.yml logs - Verify services:
docker compose -f docker-compose.prod.yml ps - Check network:
docker network ls
Welcome to the big leagues! ๐
Your Lumina 3D Explorer is now production-ready and will run forever with zero maintenance.