# 🚀 Gooneral Wheelchair - One-Click Deployment Ready to deploy your blog? Choose your method: ## 🎯 Option 1: Super Simple (Batch File) Just double-click `deploy.bat` and enter your domain, or run from command line: ```batch # Create deployment package deploy.bat yourdomain.com # Deploy directly to server (requires SSH keys set up) deploy.bat yourdomain.com your.server.ip username ``` ## 🎯 Option 2: PowerShell Commands ```powershell # Create deployment package only .\deploy-now.ps1 -Domain "yourdomain.com" # Deploy directly to server .\deploy-now.ps1 -Domain "yourdomain.com" -ServerHost "your.server.ip" -ServerUser "username" ``` ## 🎯 Option 3: Advanced PowerShell ```powershell # Full control over the deployment process .\prepare-deployment.ps1 -Domain "yourdomain.com" -ServerHost "192.168.1.100" -ServerUser "myuser" -UploadToServer ``` ## ✨ What Happens Automatically The scripts will: ### 🏗️ **Build Phase** - ✅ Build your React frontend for production - ✅ Generate secure session secrets - ✅ Create production configuration files - ✅ Package everything for deployment ### 🚀 **Deploy Phase** (if server specified) - ✅ Upload files to your server - ✅ Install Node.js dependencies - ✅ Create system user for security - ✅ Set up systemd service - ✅ Configure Caddy with auto-SSL - ✅ Create admin user with random password - ✅ Start all services ### 🎉 **Result** - 🌐 Your blog live at `https://yourdomain.com` - 🔧 Admin panel at `https://yourdomain.com/admin` - 🔐 Secure HTTPS with automatic certificates - 👤 Admin credentials displayed after deployment ## 📋 Prerequisites ### On Your Windows Machine: - ✅ Node.js installed - ✅ PowerShell execution policy allows scripts - ✅ SSH client (for direct deployment) ### On Your Server: - ✅ Ubuntu/Debian/CentOS Linux - ✅ Node.js v18+ installed - ✅ Caddy web server installed - ✅ Domain pointing to server IP - ✅ SSH access configured ## 🔥 Example Usage ```batch # I want to deploy myblog.com to my server at 192.168.1.100 deploy.bat myblog.com 192.168.1.100 myuser ``` That's it! The script will handle everything and show you the admin credentials at the end. ## 🛠️ Manual Upload Method If direct deployment doesn't work: 1. Run: `deploy.bat yourdomain.com` (creates package only) 2. Upload the `deployment-ready` folder to your server 3. SSH to your server: `ssh user@your.server.ip` 4. Navigate to uploaded folder: `cd deployment-ready` 5. Run: `chmod +x deploy.sh && ./deploy.sh` ## 🔐 Security Notes - 🚨 **Keep deployment files secure** - they contain session secrets - 🚨 **Change admin password** after first login - 🚨 **Enable firewall** on your server (ports 80, 443, SSH only) - 🚨 **Regular backups** of `/opt/gooneral-wheelchair/` ## 💡 Tips - **First time?** Use the package-only option to review files before deploying - **Multiple sites?** Run the script multiple times with different domains - **Updates?** Just run the script again - it will update your existing installation - **Troubleshooting?** Check the logs with `sudo journalctl -u gooneral-wheelchair -f` ## 🆘 Need Help? If something goes wrong: 1. Check `DEPLOYMENT.md` for detailed manual instructions 2. Verify prerequisites are installed 3. Check server logs for error messages 4. Ensure domain DNS is pointing to your server