Simple steps to run Template Doctor locally or deploy to Azure
- Docker Desktop installed and running
- GitHub account
-
Clone the repository
git clone https://github.com/Template-Doctor/template-doctor.git cd template-doctor -
Run the setup script
./scripts/full-setup.sh
- Choose option 1 (Local MongoDB - Docker)
- Follow prompts to configure GitHub OAuth (or skip for basic testing)
-
Start Template Doctor
docker-compose --profile combined up
-
Open in browser
- Navigate to:
http://localhost:3000 - You're ready to analyze templates!
- Navigate to:
-
Stop when done
docker-compose down
- Azure subscription
- Azure CLI installed
- Azure Developer CLI (azd) installed
- GitHub account
-
Clone the repository
git clone https://github.com/Template-Doctor/template-doctor.git cd template-doctor -
Run the setup script
./scripts/full-setup.sh
- Choose option 2 (Azure Cosmos DB - Production)
- Configure GitHub OAuth when prompted
- Get your GitHub Personal Access Token ready
-
Login to Azure
az login azd auth login
-
Deploy to Azure
cd infra azd up- Enter environment name (e.g., "prod")
- Select your Azure subscription
- Choose Azure region (e.g., "eastus")
- Wait 5-10 minutes for deployment
-
Done!
- Azure automatically provisions everything:
- ✅ Cosmos DB database (serverless)
- ✅ Container Apps (with auto-scaling)
- ✅ Managed Identity (secure, no passwords)
- ✅ All required permissions
- Note the URL displayed at the end of deployment
- Navigate to your Template Doctor instance
- Azure automatically provisions everything:
- ✅ GitHub account
- ✅ Docker Desktop running
⚠️ Optional: GitHub OAuth app (for authentication features)
- ✅ Azure subscription (with billing enabled)
- ✅ GitHub account
- ✅ GitHub Personal Access Token with
repoandworkflowscopes - ✅ GitHub OAuth app credentials:
- Client ID
- Client Secret
- Callback URL set to:
https://<your-app>.azurecontainerapps.io/callback.html
-
Go to GitHub Settings
- Navigate to: https://github.com/settings/developers
- Click "OAuth Apps" → "New OAuth App"
-
Configure the app
- Application name:
Template Doctor(or your choice) - Homepage URL:
- Local:
http://localhost:3000 - Production:
https://<your-app>.azurecontainerapps.io
- Local:
- Authorization callback URL:
- Local:
http://localhost:3000/callback.html - Production:
https://<your-app>.azurecontainerapps.io/callback.html
- Local:
- Application name:
-
Get credentials
- Copy the Client ID
- Generate and copy the Client Secret
- Save both securely
-
Enter during setup
- The setup script will prompt you for these values
- They'll be automatically configured
Problem: "Cannot connect to Docker daemon"
- ✅ Solution: Make sure Docker Desktop is running
Problem: "Port 3000 already in use"
- ✅ Solution: Stop any apps using port 3000, or change port in
.env
Problem: "Database connection failed"
- ✅ Solution: Make sure
MONGODB_URIis NOT set in.envfile (Docker handles this automatically)
Problem: "azd: command not found"
- ✅ Solution: Install Azure Developer CLI from https://aka.ms/azd-install
Problem: "Deployment failed - insufficient permissions"
- ✅ Solution: Make sure you have Owner or Contributor role on the Azure subscription
Problem: "GitHub OAuth not working"
- ✅ Solution: Verify callback URL in GitHub OAuth app matches your deployed URL exactly
Monthly costs (approximate):
- Cosmos DB (serverless): $0-25 (depends on usage)
- Container Apps: $0-50 (depends on traffic)
- Container Registry: $5
- Total: ~$5-80/month (mostly pay-per-use)
Note: Azure Cosmos DB serverless only charges for actual usage. Low traffic = low cost.
- Detailed setup guide:
docs/deployment/PRODUCTION_DATABASE_MANAGED_IDENTITY.md - Troubleshooting:
docs/usage/TROUBLESHOOTING.md - Quick reference:
QUICKSTART.md - Infrastructure details:
infra/README.md
- ✅ Free (no cloud costs)
- ✅ Fast setup (5 minutes)
- ✅ Works offline (after initial setup)
- ✅ Perfect for testing
- ✅ Enterprise-grade security (Managed Identity)
- ✅ Auto-scaling (handles traffic spikes)
- ✅ High availability (99.9% uptime SLA)
- ✅ No server management required
- ✅ Pay only for what you use
Choose Local if you want to:
- Test Template Doctor features
- Develop new features
- Avoid cloud costs
- Work offline
Choose Azure Production if you want to:
- Share with your team
- Production-grade reliability
- Handle multiple users
- Enterprise security
- Automatic backups and scaling