Skip to content

Conversation

@Vemarthula-Microsoft
Copy link
Contributor

  • Created PowerShell script build-push-acr.ps1 for building and pushing Docker images to ACR.
  • Created Bash script build-push-acr.sh for the same purpose, ensuring compatibility with Unix-like environments.
  • Both scripts handle environment variables, ACR login, Docker image building, and pushing to ACR with error handling.

Purpose

This pull request introduces new infrastructure and automation for building and deploying the backend Docker image to Azure Container Registry (ACR) as part of the deployment workflow. It adds a custom Dockerfile for the backend, a new Azure deployment configuration, and scripts for building and pushing the Docker image, supporting both Windows and POSIX environments.

Key infrastructure and deployment automation changes:

Docker build and deployment pipeline:

  • Added Dockerfile.backend to build a multi-stage Docker image for the backend, including both frontend and backend build steps, and configured it for deployment with Gunicorn.
  • Added azure_custom.yaml to define a custom Azure deployment workflow, including pre- and post-provision hooks that trigger the build and push scripts for both Windows and POSIX systems, ensuring proper image creation and deployment.

Automation scripts:

  • Added scripts/build-push-acr.sh, a Bash script to automate building and pushing the Docker image to ACR for POSIX systems, with error handling and environment variable support.
  • Added scripts/build-push-acr.ps1, a PowerShell script with equivalent functionality for Windows environments, ensuring cross-platform automation support.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • I have built and tested the code locally and in a deployed app
  • For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • This is a change for all users of this app. No code or asset is specific to my use case or my organization.

Other Information

- Created PowerShell script `build-push-acr.ps1` for building and pushing Docker images to ACR.
- Created Bash script `build-push-acr.sh` for the same purpose, ensuring compatibility with Unix-like environments.
- Both scripts handle environment variables, ACR login, Docker image building, and pushing to ACR with error handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants