File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 creds : ${{ secrets.AZURE_CREDENTIALS }}
3333 - name : Deploy to Azure
3434 run : |
35- az webapp up -n "copilot-${{github.actor}}" -g "rg-copilot-nodejs-todo" --sku F1 --runtime "NODE|18-lts"
35+ # Create resource group rg-copilot-nodejs-todo
36+ az group create --name rg-copilot-nodejs-todo --location eastus
37+ # Create cosmosdb with default api
38+ az cosmosdb create --name copilot-nodejs-todo --resource-group rg-copilot-nodejs-todo
39+ # Deploy webapp using node 18
40+ az webapp up --sku F1 --name nodejs-todo-sinedied --resource-group rg-copilot-nodejs-todo --runtime "node|18-lts"
41+ # Retrieve cosmosdb connection string
42+ DATABASE_CONNECTION_STRING=$(az cosmosdb keys list --name copilot-nodejs-todo --resource-group rg-copilot-nodejs-todo --type connection-strings --query "connectionStrings[0].connectionString" -o tsv)
43+ # Set connection string in webapp
44+ az webapp config appsettings set --name nodejs-todo-sinedied --resource-group rg-copilot-nodejs-todo --settings DATABASE_CONNECTION_STRING=$DATABASE_CONNECTION_STRING
You can’t perform that action at this time.
0 commit comments