Azure Deployment Setup
Satélite API is deployed on Azure Web Services, providing high availability and scalability for both production and testing environments.Available Environments
Satélite API runs on two dedicated Azure Web Services instances:Production Server
https://sateliteappapi.azurewebsites.netLive environment for production operations
Testing Server
https://sateliteappapi-test.azurewebsites.netDevelopment and testing environment
Prerequisites
Before deploying to Azure, ensure you have:- Azure subscription with active account
- Azure CLI installed locally
- .NET 6.0 SDK installed
- SQL Server databases configured
- Valid connection strings for all database contexts
Deployment Steps
Configure Application Settings
Set environment variables in Azure Portal:
- Navigate to your Web App in Azure Portal
- Go to Configuration > Application settings
- Add the following settings:
See the Configuration page for detailed settings.
Configure Connection Strings
Add connection strings in the Azure Portal:
- Go to Configuration > Connection strings
- Add each database connection string:
- SateliteConnection
- CajachicaConnection
- ConsolidadoConnection
- AnticiposConnection
- CuboComercialConnection
- NexusConnection
- CentinelaConnection
Deploy the Application
Deploy using Azure CLI:Alternatively, use Visual Studio or GitHub Actions for automated deployments.
Environment Variables
The application uses theASPNETCORE_ENVIRONMENT variable to determine the environment:
The testing environment uses the
Quality environment name as configured in launchSettings.json.Continuous Deployment with GitHub Actions
For automated deployments, create a GitHub Actions workflow:.github/workflows/azure-deploy.yml
Monitoring and Diagnostics
Configure Logging
Enable diagnostic logs in Azure Portal:
- Go to Monitoring > Diagnostic settings
- Enable:
- Application logs
- Web server logs
- Detailed error messages
Scaling Configuration
Configure auto-scaling for production workloads:Troubleshooting
Application fails to start
Application fails to start
Check the following:
- Verify all connection strings are correctly configured
- Ensure the runtime version matches (.NET 6.0)
- Check Application Insights logs for startup errors
- Verify all required environment variables are set
Database connection errors
Database connection errors
Common causes:
- Incorrect connection string format
- Firewall rules blocking Azure IP addresses
- SQL Server not allowing Azure services
Slow GraphQL queries
Slow GraphQL queries
Performance optimization:
- Enable connection pooling in database contexts
- Implement DataLoader for N+1 query problems
- Add appropriate database indexes
- Configure query execution timeout in Program.cs:272-304
Next Steps
Configuration
Configure connection strings and application settings
Environments
Learn about environment-specific configurations