Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: content-processing

requiredVersions:
azd: '>= 1.18.0 != 1.23.9'
bicep: '>= 0.33.0'
bicep: '>= 0.33.0'

metadata:
template: content-processing@1.0
Expand Down
76 changes: 76 additions & 0 deletions azure_custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
# Custom AZD configuration for Content Processing Solution Accelerator.
# Use this file to build and deploy your own modified code using AZD.
# This file works with infra/main_custom.bicep which uses placeholder container images
# that AZD replaces with your custom-built images from source.
#
# Usage:
# 1. Copy this file to azure.yaml (or rename it)
# 2. Ensure infra/main_custom.bicep is referenced (rename to main.bicep or update infra path)
# 3. Run: azd up
#
# For more information, see the Deployment Guide in docs/DeploymentGuide.md
name: content-processing

requiredVersions:
azd: '>= 1.18.0 != 1.23.9'

metadata:
template: content-processing@1.0
name: content-processing@1.0

# infra:
# path: infra
# module: main_custom

services:
contentprocessor:
project: ./src/ContentProcessor
language: py
host: containerapp
docker:
path: ./Dockerfile
image: contentprocessor
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
remoteBuild: true

contentprocessorapi:
project: ./src/ContentProcessorAPI
language: py
host: containerapp
docker:
path: ./Dockerfile
image: contentprocessorapi
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
remoteBuild: true

contentprocessorweb:
project: ./src/ContentProcessorWeb
language: js
host: containerapp
docker:
path: ./Dockerfile
image: contentprocessorweb
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
remoteBuild: true

contentprocessorworkflow:
project: ./src/ContentProcessorWorkflow
language: py
host: containerapp
docker:
path: ./Dockerfile
image: contentprocessorworkflow
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
remoteBuild: true

hooks:
postprovision:
posix:
shell: sh
run: sed -i 's/\r$//' ./infra/scripts/post_deployment.sh; bash ./infra/scripts/post_deployment.sh
interactive: true
windows:
shell: pwsh
run: ./infra/scripts/post_deployment.ps1
interactive: true
35 changes: 15 additions & 20 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,34 +508,29 @@ Now that your deployment is complete and tested, explore these resources:

---

## Advanced: Deploy Local Code Changes
## Advanced: Deploy Local Changes

Use this method to quickly deploy code changes from your local machine to your existing Azure deployment without re-provisioning infrastructure.
If you've made local modifications to the code and want to deploy them to Azure, follow these steps to swap the configuration files:

> **Note:** To set up and run the application locally for development, see the [Local Development Setup Guide](./LocalDevelopmentSetup.md).

### How it Works
This process will:
1. Rebuild the Docker containers locally using your modified source code.
2. Push the new images to your Azure Container Registry (ACR).
3. Restart the Azure Container Apps to pick up the new images.
### Step 1: Rename Azure Configuration Files

### Prerequisites
- **Docker Desktop** must be installed and running.
- You must have an active deployment environment selected (`azd env select <env-name>`).
**In the root directory:**
1. Rename `azure.yaml` to `azure_custom2.yaml`
2. Rename `azure_custom.yaml` to `azure.yaml`

### Deployment Steps
### Step 2: Rename Infrastructure Files

Run the build and push script for your operating system:
**In the `infra` directory:**
1. Rename `main.bicep` to `main_custom2.bicep`
2. Rename `main_custom.bicep` to `main.bicep`

**Linux/macOS:**
```bash
./infra/scripts/docker-build.sh
```
### Step 3: Deploy Changes

**Windows (PowerShell):**
```powershell
./infra/scripts/docker-build.ps1
Run the deployment command:
```shell
azd up
```

> **Note:** These scripts will deploy your local code changes instead of pulling from the GitHub repository.
> **Note:** These custom files are configured to deploy your local code changes instead of pulling from the GitHub repository.
Loading
Loading