- Azure account
- Azure CLI installed (
brew install azure-clion macOS) - Git installed
az loginaz group create --name eshor-fights-rg --location westeurope# Create PostgreSQL server
az postgres flexible-server create \
--resource-group eshor-fights-rg \
--name eshor-fights-db \
--location westeurope \
--admin-user eshoradmin \
--admin-password YOUR_SECURE_PASSWORD_HERE \
--sku-name Standard_B1ms \
--tier Burstable \
--version 14
# Create database
az postgres flexible-server db create \
--resource-group eshor-fights-rg \
--server-name eshor-fights-db \
--database-name fighttracker
# Allow Azure services to connect
az postgres flexible-server firewall-rule create \
--resource-group eshor-fights-rg \
--name eshor-fights-db \
--rule-name AllowAzureServices \
--start-ip-address 0.0.0.0 \
--end-ip-address 0.0.0.0# Create App Service Plan
az appservice plan create \
--name eshor-fights-plan \
--resource-group eshor-fights-rg \
--sku B1 \
--is-linux
# Create Web App
az webapp create \
--resource-group eshor-fights-rg \
--plan eshor-fights-plan \
--name eshor-fights-app \
--runtime "PYTHON:3.11"# Get your PostgreSQL connection string
# Format: postgresql://eshoradmin:YOUR_PASSWORD@eshor-fights-db.postgres.database.azure.com:5432/fighttracker?sslmode=require
az webapp config appsettings set \
--resource-group eshor-fights-rg \
--name eshor-fights-app \
--settings \
DATABASE_URL="postgresql://eshoradmin:YOUR_PASSWORD@eshor-fights-db.postgres.database.azure.com:5432/fighttracker?sslmode=require" \
SECRET_KEY="$(python3 -c 'import secrets; print(secrets.token_hex(32))')" \
FLASK_DEBUG="False"az webapp config set \
--resource-group eshor-fights-rg \
--name eshor-fights-app \
--startup-file "gunicorn --bind=0.0.0.0 --timeout 600 wsgi:app"# Initialize git if not already
git init
git add .
git commit -m "Initial commit"
# Deploy using Azure CLI
az webapp deployment source config-local-git \
--resource-group eshor-fights-rg \
--name eshor-fights-app
# Get the deployment URL and push
git remote add azure <deployment-url-from-above>
git push azure main- Go to Azure Portal → Your Web App → Deployment Center
- Connect to your GitHub repository
- Azure will automatically create a GitHub Actions workflow
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run locally (uses SQLite)
python app.pyVisit: http://localhost:5000
| שם משתמש | סיסמה התחלתית | הערות |
|---|---|---|
| נתי | נתי | יש לשנות בכניסה ראשונה |
| קובי | קובי | יש לשנות בכניסה ראשונה |
| מיכל | מיכל | יש לשנות בכניסה ראשונה |
| גלית | גלית | יש לשנות בכניסה ראשונה |
| אביבית | אביבית | יש לשנות בכניסה ראשונה |
| עלמא | עלמא | יש לשנות בכניסה ראשונה |
| אמיליה | אמיליה | יש לשנות בכניסה ראשונה |
| admin | Oren203038500 | מנהל מערכת |
- App Service B1: ~$13/month
- PostgreSQL Burstable B1ms: ~$15/month
- Total: ~$28/month
💡 Tip: For even lower costs, use the Free tier for App Service during testing.
az webapp log tail --resource-group eshor-fights-rg --name eshor-fights-appaz webapp ssh --resource-group eshor-fights-rg --name eshor-fights-appaz webapp restart --resource-group eshor-fights-rg --name eshor-fights-app