Backup: 2025-06-07 19:48 - Script test

[Restore from backup: vip-coordinator-backup-2025-06-07-19-48-script-test]
This commit is contained in:
2025-06-07 19:48:00 +02:00
parent 8fb00ec041
commit dc4655cef4
103 changed files with 16396 additions and 6143 deletions

258
STANDALONE_INSTALL.md Normal file
View File

@@ -0,0 +1,258 @@
# 🚀 VIP Coordinator - Standalone Installation
Deploy VIP Coordinator directly from Docker Hub - **No GitHub required!**
## 📦 What You Get
-**Pre-built Docker images** from Docker Hub
-**Interactive setup script** that configures everything
-**Complete deployment** in under 5 minutes
-**No source code needed** - just Docker containers
## 🔧 Prerequisites
**Ubuntu/Linux:**
```bash
# Install Docker and Docker Compose
sudo apt update
sudo apt install docker.io docker-compose
sudo usermod -aG docker $USER
# Log out and back in, or run: newgrp docker
```
**Other Systems:**
- Install Docker Desktop from https://docker.com/get-started
## 🚀 Installation Methods
### Method 1: Direct Download (Recommended)
```bash
# Create directory
mkdir vip-coordinator
cd vip-coordinator
# Download the standalone setup script
curl -O https://your-domain.com/standalone-setup.sh
# Make executable and run
chmod +x standalone-setup.sh
./standalone-setup.sh
```
### Method 2: Copy-Paste Installation
If you can't download the script, you can create it manually:
```bash
# Create directory
mkdir vip-coordinator
cd vip-coordinator
# Create the setup script (copy the content from standalone-setup.sh)
nano standalone-setup.sh
# Make executable and run
chmod +x standalone-setup.sh
./standalone-setup.sh
```
### Method 3: Manual Docker Hub Deployment
If you prefer to set up manually:
```bash
# Create directory
mkdir vip-coordinator
cd vip-coordinator
# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
db:
image: postgres:15
environment:
POSTGRES_DB: vip_coordinator
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:7
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
backend:
image: t72chevy/vip-coordinator:backend-latest
environment:
DATABASE_URL: postgresql://postgres:${DB_PASSWORD}@db:5432/vip_coordinator
REDIS_URL: redis://redis:6379
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
FRONTEND_URL: ${FRONTEND_URL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
PORT: 3000
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
frontend:
image: t72chevy/vip-coordinator:frontend-latest
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres-data:
EOF
# Create .env file with your configuration
nano .env
# Start the application
docker-compose pull
docker-compose up -d
```
## 🎯 What the Setup Script Does
1. **Checks Prerequisites**: Verifies Docker and Docker Compose are installed
2. **Interactive Configuration**: Asks for your deployment preferences
3. **Generates Files**: Creates all necessary configuration files
4. **Pulls Images**: Downloads pre-built images from Docker Hub
5. **Creates Management Scripts**: Provides easy start/stop/update commands
## 📋 Configuration Options
The script will ask you for:
- **Deployment Type**: Local development or production
- **Domain Settings**: Your domain names (for production)
- **Security**: Generates secure passwords automatically
- **Google OAuth**: Your Google Cloud Console credentials
- **Optional**: AviationStack API key for flight data
## 🔐 Google OAuth Setup
You'll need to set up Google OAuth (the script guides you through this):
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project
3. Enable Google+ API
4. Create OAuth 2.0 Client ID
5. Add redirect URI (provided by the script)
6. Copy Client ID and Secret
## 📦 Docker Hub Images Used
This deployment uses these pre-built images:
- **`t72chevy/vip-coordinator:backend-latest`** (404MB)
- Complete Node.js backend with OAuth fixes
- PostgreSQL and Redis integration
- Health checks and monitoring
- **`t72chevy/vip-coordinator:frontend-latest`** (74.8MB)
- React frontend with mobile OAuth fixes
- Nginx web server
- Production-optimized build
- **`postgres:15`** - Database
- **`redis:7`** - Cache and sessions
## 🚀 After Installation
Once setup completes, you'll have these commands:
```bash
./start.sh # Start VIP Coordinator
./stop.sh # Stop VIP Coordinator
./update.sh # Update to latest Docker Hub images
./status.sh # Check system status
./logs.sh # View application logs
```
## 🌐 Access Your Application
- **Local**: http://localhost
- **Production**: https://your-domain.com
## 🔄 Updates
To update to the latest version:
```bash
./update.sh
```
This pulls the latest images from Docker Hub and restarts the services.
## 📱 Mobile Support
This deployment includes fixes for mobile OAuth authentication:
- ✅ Mobile users can now log in successfully
- ✅ Proper API endpoint configuration
- ✅ Enhanced error handling
## 🛠️ Troubleshooting
### Common Issues
**Docker permission denied:**
```bash
sudo usermod -aG docker $USER
newgrp docker
```
**Port conflicts:**
```bash
# Check what's using ports 80 and 3000
sudo netstat -tulpn | grep :80
sudo netstat -tulpn | grep :3000
```
**Service not starting:**
```bash
./status.sh # Check status
./logs.sh # View logs
```
## 📞 Distribution
To share VIP Coordinator with others:
1. **Share the setup script**: Give them `standalone-setup.sh`
2. **Share this guide**: Include `STANDALONE_INSTALL.md`
3. **No GitHub needed**: Everything pulls from Docker Hub
## 🎉 Benefits of Standalone Deployment
-**No source code required**
-**No GitHub repository needed**
-**Pre-built, tested images**
-**Automatic updates from Docker Hub**
-**Cross-platform compatibility**
-**Production-ready configuration**
---
**🚀 Get VIP Coordinator running in under 5 minutes with just Docker and one script!**