You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.9 KiB
1.9 KiB
Lottery Simple DApp - Deployment Guide
Quick Deployment
Local Testing
# Build and run with Docker
./deploy.sh
# Or manually:
docker-compose up --build -d
# Access at: http://localhost:14888
Remote Server Deployment
-
Sync files to server:
# Only sync the necessary frontend files rsync -av --exclude='.git' --exclude='node_modules' --exclude='target' \ --exclude='programs' --exclude='client' --exclude='tests' \ /home/crappy/lottery/lottery-simple/ user@your-server:/opt/lottery-simple/ -
On the remote server:
cd /opt/lottery-simple ./deploy.sh -
Nginx reverse proxy (optional):
location /lottery/ { proxy_pass http://localhost:14888/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
Configuration
Environment Variables
- Edit
config.jsonfor different environments - Update
programId,mint, anddevWalletas needed
Port Configuration
- Default:
14888(configured in docker-compose.yml) - Health check:
/health
File Structure (Clean)
lottery-simple/
├── index.html # Frontend HTML
├── styles.css # CSS styles
├── app.js # Frontend JavaScript
├── config.json # Configuration
├── Dockerfile # Docker build
├── docker-compose.yml # Docker orchestration
├── nginx.conf # Web server config
├── deploy.sh # Deployment script
└── .dockerignore # Build exclusions
Troubleshooting
Check container status:
docker-compose ps
docker-compose logs
Manual container management:
docker-compose stop
docker-compose start
docker-compose restart
Clean rebuild:
docker-compose down
docker-compose build --no-cache
docker-compose up -d