Skip to content

Commit 3362c1b

Browse files
committed
more indents
1 parent 146e9a3 commit 3362c1b

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

articles/container-apps/javascript-overview.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -174,58 +174,58 @@ For production builds, make sure you use the correct version tag, which may not
174174
## Deployment
175175
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.
176176

177-
```yaml
178-
# .github/workflows/deploy.yml
179-
name: Deploy to Azure
180-
181-
on:
182-
push:
183-
branches:
184-
- main
185-
186-
jobs:
187-
build-and-deploy:
188-
runs-on: ubuntu-latest
189-
190-
steps:
191-
- uses: actions/checkout@v4
192-
193-
- name: Set up Node.js
194-
uses: actions/setup-node@v4
195-
with:
196-
node-version: '22'
197-
198-
- name: Install dependencies
199-
run: npm ci
200-
201-
- name: Build the app
202-
run: npm run build
203-
204-
- name: Log in to Azure
205-
uses: azure/login@v2
206-
with:
207-
creds: ${{ secrets.AZURE_CREDENTIALS }}
208-
209-
- name: Deploy to Azure Container Apps
210-
run: |
211-
az containerapp up \
212-
--name my-container-app \
213-
--resource-group my-resource-group \
214-
--image my-docker-image \
215-
--environment my-environment \
216-
--cpu 1 --memory 2Gi \
217-
--env-vars NODE_ENV=production PORT=3000
218-
```
177+
```yaml
178+
# .github/workflows/deploy.yml
179+
name: Deploy to Azure
180+
181+
on:
182+
push:
183+
branches:
184+
- main
185+
186+
jobs:
187+
build-and-deploy:
188+
runs-on: ubuntu-latest
189+
190+
steps:
191+
- uses: actions/checkout@v4
192+
193+
- name: Set up Node.js
194+
uses: actions/setup-node@v4
195+
with:
196+
node-version: '22'
197+
198+
- name: Install dependencies
199+
run: npm ci
200+
201+
- name: Build the app
202+
run: npm run build
203+
204+
- name: Log in to Azure
205+
uses: azure/login@v2
206+
with:
207+
creds: ${{ secrets.AZURE_CREDENTIALS }}
208+
209+
- name: Deploy to Azure Container Apps
210+
run: |
211+
az containerapp up \
212+
--name my-container-app \
213+
--resource-group my-resource-group \
214+
--image my-docker-image \
215+
--environment my-environment \
216+
--cpu 1 --memory 2Gi \
217+
--env-vars NODE_ENV=production PORT=3000
218+
```
219219
220220
When using Docker Registry, sign into your registry then push your Docker images to a container registry like Azure Container Registry (ACR) or Docker Hub.
221221
222-
```bash
223-
# Tag the image
224-
docker tag my-app:latest myregistry.azurecr.io/my-app:latest
222+
```bash
223+
# Tag the image
224+
docker tag my-app:latest myregistry.azurecr.io/my-app:latest
225225

226-
# Push the image
227-
docker push myregistry.azurecr.io/my-app:latest
228-
```
226+
# Push the image
227+
docker push myregistry.azurecr.io/my-app:latest
228+
```
229229

230230
## Cold starts
231231

@@ -243,9 +243,9 @@ Security considerations for JavaScript developers using Azure Container Apps inc
243243

244244
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.
245245

246-
```bash
247-
az keyvault secret set --vault-name myKeyVault --name "CosmosDBConnectionString" --value "<your-connection-string>"
248-
```
246+
```bash
247+
az keyvault secret set --vault-name myKeyVault --name "CosmosDBConnectionString" --value "<your-connection-string>"
248+
```
249249

250250
### HTTPS and certificates
251251

@@ -255,9 +255,9 @@ Ensure your application is served over HTTPS. Azure Container Apps can manage [c
255255

256256
Regularly update your dependencies to avoid security vulnerabilities. Use tools like `npm audit` to check for vulnerabilities.
257257

258-
```bash
259-
npm audit
260-
```
258+
```bash
259+
npm audit
260+
```
261261

262262

263263
## Error handling

0 commit comments

Comments
 (0)