#!/bin/bash # Git initialization script for Northern Thailand Ping River Monitor echo "🏔️ Initializing Git repository for Northern Thailand Ping River Monitor" # Initialize git repository git init # Add remote origin git remote add origin https://git.b4l.co.th/B4L/Northern-Thailand-Ping-River-Monitor.git # Create .gitignore if it doesn't exist if [ ! -f .gitignore ]; then echo "Creating .gitignore file..." cat > .gitignore << 'EOF' # Python __pycache__/ *.py[cod] *.so .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # Virtual environments .env .venv env/ venv/ ENV/ # IDE .vscode/ .idea/ *.swp *.swo # Logs *.log logs/ # Database files *.db *.sqlite *.sqlite3 # OS .DS_Store Thumbs.db EOF fi # Add all files git add . # Initial commit git commit -m "Initial commit: Northern Thailand Ping River Monitor v3.1.3 Features: - Real-time water level monitoring for Ping River Basin - 16 monitoring stations from Chiang Dao to Nakhon Sawan - FastAPI web interface with station management - Multi-database support (SQLite, MySQL, PostgreSQL, InfluxDB, VictoriaMetrics) - Comprehensive monitoring and health checks - Docker deployment with Grafana integration - Production-ready architecture with CI/CD pipeline" echo "✅ Git repository initialized successfully!" echo "" echo "Next steps:" echo "1. Review and edit .env file with your configuration" echo "2. Push to remote repository:" echo " git push -u origin main" echo "" echo "3. Start the application:" echo " make run-api" echo " # or: python run.py --web-api"