Skip to content

Commit f3f2a69

Browse files
committed
edits
1 parent 6b00795 commit f3f2a69

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

articles/container-apps/javascript-overview.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ For production builds, make sure you use the correct version tag, which may not
172172

173173

174174
## Deployment
175+
175176
To support continuous integration/continuous deployment (CI/CD), set up a CI/CD pipeline using GitHub Actions, Azure DevOps, or another CI/CD tool to automate the deployment process.
176177

177178
```yaml
@@ -241,10 +242,15 @@ Security considerations for JavaScript developers using Azure Container Apps inc
241242

242243
### Secure environment variables
243244

244-
Ensure sensitive information such as database connection strings and API keys are stored securely. Use Azure Key Vault to manage secrets and environment variables securely.
245+
Ensure sensitive information such as database connection strings and API keys are stored securely. Use Azure Key Vault to manage secrets and environment variables securely.
245246

246-
```bash
247-
az keyvault secret set --vault-name myKeyVault --name "CosmosDBConnectionString" --value "<your-connection-string>"
247+
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
248+
249+
```azurecli
250+
az keyvault secret set \
251+
--vault-name <KEY_VAULT_APP> \
252+
--name "CosmosDBConnectionString" \
253+
--value "<YOUR_CONNECTION_STRING>"
248254
```
249255

250256
### HTTPS and certificates
@@ -402,10 +408,14 @@ You can implement remote debugging with the following steps:
402408

403409
1. Trigger debug mode by setting the environment variable `ENABLE_DEBUG` to `true`. For example, using the Azure CLI:
404410

405-
```bash
406-
az containerapp update --name my-container-app --env-vars ENABLE_DEBUG=true
411+
```azurecli
412+
az containerapp update \
413+
--name <CONTAINER_APP> \
414+
--env-vars ENABLE_DEBUG=true
407415
```
408416

417+
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
418+
409419
This approach offers a flexible solution that allows you to restart the container in debug mode by updating an environment variable at startup. It avoids the need to create a new revision with different `CMD` settings every time you need to debug your application.
410420

411421
## Maintenance and performance considerations
@@ -434,12 +444,12 @@ npm install
434444

435445
Configure autoscaling based on the application's load. Azure Container Apps supports horizontal scaling, which automatically adjusts the number of container instances based on CPU or memory usage.
436446

437-
The following example demonstrates how to set a CPU-based scale rule.
447+
The following example demonstrates how to set a CPU-based scale rule. Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
438448

439-
```bash
449+
```azurecli
440450
az containerapp revision set-scale \
441-
--name my-container-app \
442-
--resource-group my-resource-group \
451+
--name <CONTAINER_APP> \
452+
--resource-group <RESOURCE_GROUP> \
443453
--min-replicas 1 \
444454
--max-replicas 10 \
445455
--cpu 80
@@ -451,9 +461,7 @@ Set up monitoring and alerts to track the performance and health of your applica
451461

452462
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
453463

454-
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
455-
456-
```bash
464+
```azurecli
457465
az monitor metrics alert create \
458466
--name "HighCPUUsage" \
459467
--resource-group my-resource-group \
@@ -472,21 +480,21 @@ When your application runs into run time issues on Azure Container Apps, you can
472480

473481
### Logging
474482

475-
Enable and configure logging to capture application logs. Use Azure Monitor and Log Analytics to collect and analyze logs.
483+
Enable and configure logging to capture application logs. Use Azure Monitor and Log Analytics to collect and analyze logs. Before running these commands, make sure to replace the placeholders surrounded by `<>` with your values.
476484

477485
1. Create a new workspace.
478486

479487
```azurecli
480488
az monitor log-analytics workspace create \
481-
--resource-group my-resource-group \
489+
--resource-group <RESOURCE_GROUP> \
482490
--workspace-name <WORKSPACE_NAME>
483491
```
484492

485493
1. Then create a new workspace setting.
486494

487495
```azurecli
488496
az monitor diagnostic-settings create \
489-
--resource my-container-app \
497+
--resource <CONTAINER_APP> \
490498
--workspace <WORKSPACE_NAME> \
491499
--logs '[{"category": "ContainerAppConsoleLogs","enabled": true}]'
492500
```

0 commit comments

Comments
 (0)