Azure Deployment
Deploy nopCommerce to Microsoft Azure.
Deployment Options
| Service | Best For |
|---|---|
| App Service | Simple deployments, auto-scaling |
| Azure VM | Full control, custom configuration |
| Azure Container Apps | Containerized deployments |
| Azure Kubernetes | Large-scale, microservices |
Azure App Service
Step 1: Create Resources
bash
# Create resource group
az group create --name nopCommerce-rg --location eastus
# Create App Service plan
az appservice plan create \
--name nop-plan \
--resource-group nopCommerce-rg \
--sku B2 \
--is-linux
# Create web app
az webapp create \
--name your-nopcommerce \
--resource-group nopCommerce-rg \
--plan nop-plan \
--runtime "DOTNETCORE:8.0"Step 2: Create Azure SQL
bash
az sql server create \
--name nop-sql-server \
--resource-group nopCommerce-rg \
--admin-user sqladmin \
--admin-password YourPassword123!
az sql db create \
--name nopCommerce \
--resource-group nopCommerce-rg \
--server nop-sql-server \
--service-objective S0Step 3: Deploy
bash
# Deploy from local publish folder
az webapp deploy \
--name your-nopcommerce \
--resource-group nopCommerce-rg \
--src-path ./publish.zip \
--type zipConfiguration
Set connection string in Azure Portal:
- Go to App Service → Configuration
- Add Connection String:
- Name:
DefaultConnection - Value: Your SQL connection string
- Type: SQLAzure
- Name:
Scaling
bash
# Scale up (more powerful instance)
az appservice plan update --sku P1V2 --name nop-plan
# Scale out (multiple instances)
az webapp update --set siteConfig.numberOfWorkers=3 --name your-nopcommerceRecommended Settings
- Enable Always On for production
- Configure Deployment Slots for zero-downtime updates
- Set up Azure CDN for static content
- Enable Application Insights for monitoring