2.1 KiB
2.1 KiB
Paper Dynasty Deployment Guide
Current Deployment Process (Shell Script)
Quick Start
From the discord-app directory:
./deploy.sh 1.3.0
Or let it prompt you for version:
./deploy.sh
What It Does
- Validates version format (X.Y or X.Y.Z)
- Builds Docker image with both
latestand version tags - Pushes to Docker Hub (manticorum67/paper-dynasty)
- Creates git tag (v1.3.0)
- Deploys to sba-bots via SSH
- Cleans up old images
Version Numbering
- Bug fixes: Increment patch (1.2.0 → 1.2.1)
- New features: Increment minor (1.2.1 → 1.3.0)
- Breaking changes: Increment major (1.3.0 → 2.0.0)
Examples
# Deploy a bug fix
./deploy.sh 1.2.1
# Deploy a new feature
./deploy.sh 1.3.0
# Deploy with 'v' prefix (works either way)
./deploy.sh v1.3.0
Rollback Process
If something goes wrong:
ssh sba-bots
cd /container-data/paper-dynasty
# Check available versions
docker image ls | grep paper-dynasty
# Update docker-compose.yml to use specific version
# Change: image: manticorum67/paper-dynasty:latest
# To: image: manticorum67/paper-dynasty:1.2.0
docker compose up -d
Future: Automated CI/CD (GitHub Actions + Watchtower)
When ready to automate further, we'll:
- Add GitHub Actions workflow to auto-build on git tags
- Install Watchtower on sba-bots to auto-deploy
- Push tags and walk away ☕
Files ready in .github/workflows/ when you're ready to switch.
Troubleshooting
"Permission denied" when running script
chmod +x deploy.sh
"Docker build failed"
- Check Dockerfile syntax
- Ensure all required files are present
- Check Docker daemon is running
"Failed to push to Docker Hub"
- Verify you're logged in:
docker login - Check Docker Hub credentials
"SSH connection failed"
- Verify SSH key is configured:
ssh sba-bots - Check ~/.ssh/config has sba-bots entry
Remote deployment fails but build succeeds
- SSH into sba-bots manually
- Check disk space:
df -h - Check docker-compose.yml is present in
/container-data/paper-dynasty/ - Run docker compose commands manually to see error