Initial commit: BTC Bot with dashboard, TA analysis, and 14 timeframes
This commit is contained in:
120
MIGRATION_CHECKLIST.md
Normal file
120
MIGRATION_CHECKLIST.md
Normal file
@ -0,0 +1,120 @@
|
||||
# Quick Migration Checklist
|
||||
|
||||
## Pre-Migration (Current Location)
|
||||
|
||||
- [ ] Review PROJECT_CONTEXT.md
|
||||
- [ ] Ensure all Dockerfiles don't have `apt-get` commands
|
||||
- [ ] Note any custom modifications made
|
||||
- [ ] Export any existing data (if needed):
|
||||
```bash
|
||||
docker exec btc_timescale pg_dump -U btc_bot btc_data > backup.sql
|
||||
```
|
||||
|
||||
## Copy Files
|
||||
|
||||
Copy entire `btc_bot/` folder to new location:
|
||||
|
||||
```bash
|
||||
# Option 1: Direct copy
|
||||
cp -r btc_bot /new/location/
|
||||
|
||||
# Option 2: Tar archive
|
||||
tar -czvf btc_bot_backup.tar.gz btc_bot/
|
||||
# Copy to new location
|
||||
tar -xzvf btc_bot_backup.tar.gz -C /new/location/
|
||||
|
||||
# Option 3: rsync
|
||||
rsync -avz --progress btc_bot/ user@new-host:/path/to/btc_bot/
|
||||
```
|
||||
|
||||
## Post-Migration (New Location)
|
||||
|
||||
- [ ] Run migration helper: `./scripts/migrate.sh`
|
||||
- [ ] Verify `.env` file exists and has correct password
|
||||
- [ ] Check file permissions: `ls -la scripts/*.sh`
|
||||
- [ ] Review `docker/timescaledb.conf` for any local adjustments
|
||||
- [ ] Update `config/data_config.yaml` if paths changed
|
||||
|
||||
## Deploy
|
||||
|
||||
- [ ] Run: `./scripts/deploy.sh`
|
||||
- [ ] Check container status: `docker-compose ps`
|
||||
- [ ] Test health endpoint: `curl http://localhost:8000/api/v1/health`
|
||||
- [ ] Open dashboard: `http://your-ip:8000/dashboard`
|
||||
- [ ] Verify database: `docker exec btc_timescale psql -U btc_bot -d btc_data -c "SELECT version();"`
|
||||
|
||||
## Verification
|
||||
|
||||
- [ ] WebSocket connecting (check logs)
|
||||
- [ ] Candles appearing in database
|
||||
- [ ] Dashboard loading
|
||||
- [ ] API responding
|
||||
- [ ] No errors in logs
|
||||
|
||||
## Optional: Import Old Data
|
||||
|
||||
If you exported data from old location:
|
||||
|
||||
```bash
|
||||
docker exec -i btc_timescale psql -U btc_bot -d btc_data < backup.sql
|
||||
```
|
||||
|
||||
## Troubleshooting Migration Issues
|
||||
|
||||
### Permission Denied on Scripts
|
||||
```bash
|
||||
chmod +x scripts/*.sh
|
||||
```
|
||||
|
||||
### Docker Build Fails
|
||||
```bash
|
||||
cd docker
|
||||
docker-compose down
|
||||
docker system prune -f
|
||||
docker-compose build --no-cache
|
||||
```
|
||||
|
||||
### Database Connection Failed
|
||||
```bash
|
||||
# Check if .env has correct DB_PASSWORD
|
||||
cat .env | grep DB_PASSWORD
|
||||
|
||||
# Verify database is running
|
||||
docker-compose ps
|
||||
|
||||
# Check database logs
|
||||
docker-compose logs timescaledb
|
||||
```
|
||||
|
||||
### Port Already in Use
|
||||
```bash
|
||||
# Check what's using port 5432 or 8000
|
||||
sudo netstat -tulpn | grep 5432
|
||||
sudo netstat -tulpn | grep 8000
|
||||
|
||||
# Change ports in docker-compose.yml if needed
|
||||
```
|
||||
|
||||
## Post-Migration Cleanup (Old Location)
|
||||
|
||||
After confirming new location works:
|
||||
|
||||
```bash
|
||||
# Old location - stop and remove containers
|
||||
cd docker
|
||||
docker-compose down -v # -v removes volumes (WARNING: deletes data!)
|
||||
|
||||
# Or just stop without deleting data
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- **Database data**: Will be fresh (empty) in new location unless you export/import
|
||||
- **Logs**: Start fresh in new location
|
||||
- **Configuration**: .env file needs to be recreated in new location
|
||||
- **Backups**: Update backup scripts to point to new path
|
||||
|
||||
---
|
||||
|
||||
**Remember**: The project is now portable and ready for deployment anywhere with Docker support!
|
||||
Reference in New Issue
Block a user