You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/javascript-overview.md
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,7 @@ For production builds, make sure you use the correct version tag, which may not
172
172
173
173
174
174
## Deployment
175
+
175
176
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.
176
177
177
178
```yaml
@@ -241,10 +242,15 @@ Security considerations for JavaScript developers using Azure Container Apps inc
241
242
242
243
### Secure environment variables
243
244
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.
245
246
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>"
248
254
```
249
255
250
256
### HTTPS and certificates
@@ -402,10 +408,14 @@ You can implement remote debugging with the following steps:
402
408
403
409
1. Trigger debug mode by setting the environment variable `ENABLE_DEBUG` to `true`. For example, using the Azure CLI:
404
410
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
407
415
```
408
416
417
+
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
418
+
409
419
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.
410
420
411
421
## Maintenance and performance considerations
@@ -434,12 +444,12 @@ npm install
434
444
435
445
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.
436
446
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.
438
448
439
-
```bash
449
+
```azurecli
440
450
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> \
443
453
--min-replicas 1 \
444
454
--max-replicas 10 \
445
455
--cpu 80
@@ -451,9 +461,7 @@ Set up monitoring and alerts to track the performance and health of your applica
451
461
452
462
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
453
463
454
-
Before running this command, make sure to replace the placeholders surrounded by `<>` with your values.
455
-
456
-
```bash
464
+
```azurecli
457
465
az monitor metrics alert create \
458
466
--name "HighCPUUsage" \
459
467
--resource-group my-resource-group \
@@ -472,21 +480,21 @@ When your application runs into run time issues on Azure Container Apps, you can
472
480
473
481
### Logging
474
482
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.
0 commit comments