# BlackRoad Deploy - Deployment Instructions ## ✅ What's Been Completed 1. **Code Repository**: https://github.com/blackboxprogramming/blackroad-deploy 2. **Deployment API**: Full REST API with Docker integration 3. **CLI Tool**: Complete command-line interface 4. **Infrastructure Scripts**: Automated setup for servers 5. **Documentation**: Complete guides and architecture docs ## 🚀 Deploy to Your Servers ### Option 1: One-Command Deployment (Recommended) ```bash # SSH to your server ssh root@159.65.43.12 # DigitalOcean # OR ssh alice-pi # Raspberry Pi # Download and run deployment script curl -fsSL https://raw.githubusercontent.com/blackboxprogramming/blackroad-deploy/main/DEPLOY_NOW.sh | sudo bash ``` This script will: - ✅ Install Docker & Docker Compose - ✅ Clone the repository - ✅ Configure environment - ✅ Start all services - ✅ Set up Cloudflare Tunnel ### Option 2: Manual Deployment #### Step 1: Prepare Server ```bash # SSH to server ssh root@159.65.43.12 # Install Docker curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh # Install Docker Compose apt-get update && apt-get install -y docker-compose ``` #### Step 2: Clone and Configure ```bash # Clone repository cd /opt git clone https://github.com/blackboxprogramming/blackroad-deploy.git cd blackroad-deploy # Configure environment cp .env.example .env nano .env # Add your passwords and tokens ``` Edit `.env`: ```bash DB_PASSWORD=your_secure_password CF_API_TOKEN=yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy CF_ZONE_ID=848cf0b18d51e0170e0d1537aec3505a TUNNEL_ID=72f1d60c-dcf2-4499-b02d-d7a063018b33 ``` #### Step 3: Start Services ```bash # Start all services docker-compose up -d # Check status docker-compose ps docker-compose logs -f ``` Services will be running: - **API**: http://localhost:3000 - **PostgreSQL**: localhost:5432 - **Caddy**: http://localhost:8080 #### Step 4: Set Up Cloudflare Tunnel ```bash # Install cloudflared curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared chmod +x /usr/local/bin/cloudflared # Login to Cloudflare cloudflared tunnel login # Create tunnel config mkdir -p /root/.cloudflared cat > /root/.cloudflared/config.yml < backup.sql # Backup environment cp .env .env.backup # Restore database docker-compose exec -T postgres psql -U postgres blackroad_deploy < backup.sql ``` ## 🔄 Updates ```bash # Pull latest code cd /opt/blackroad-deploy git pull # Rebuild and restart docker-compose down docker-compose up -d --build ``` ## 📞 Support - **Repository**: https://github.com/blackboxprogramming/blackroad-deploy - **Issues**: https://github.com/blackboxprogramming/blackroad-deploy/issues - **Email**: blackroad.systems@gmail.com ## 🎉 You're Done! Your own Railway alternative is now running. Deploy unlimited apps for ~$12/month! ```bash blackroad deploy ``` --- Built with ❤️ by BlackRoad Systems