Skip to content
Draft
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
79 changes: 79 additions & 0 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Deploy to Azure Container Apps

on:
push:
branches: [ main, master ]
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment'
required: true
default: 'production'
type: choice
options:
- production
- staging

env:
IMAGE_NAME: quart-react-demo

permissions:
contents: read
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Set deployment variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "timestamp=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT

- name: Build and push to ACR
run: |
az acr build \
--registry ${{ secrets.ACR_NAME }} \
--image ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.sha_short }} \
--image ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.timestamp }} \
--image ${{ env.IMAGE_NAME }}:latest \
--file Dockerfile \
.

- name: Deploy to Azure Container Apps
run: |
az containerapp update \
--name ${{ secrets.CONTAINER_APP_NAME }} \
--resource-group ${{ secrets.RESOURCE_GROUP }} \
--image ${{ secrets.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.sha_short }}

- name: Get application URL
id: app-url
run: |
APP_URL=$(az containerapp show \
--name ${{ secrets.CONTAINER_APP_NAME }} \
--resource-group ${{ secrets.RESOURCE_GROUP }} \
--query properties.configuration.ingress.fqdn \
-o tsv)
echo "url=https://$APP_URL" >> $GITHUB_OUTPUT

- name: Deployment summary
run: |
echo "### Deployment Complete! 🚀" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Application URL**: ${{ steps.app-url.outputs.url }}" >> $GITHUB_STEP_SUMMARY
echo "- **Image Tag**: ${{ steps.vars.outputs.sha_short }}" >> $GITHUB_STEP_SUMMARY
echo "- **Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "- **Resource Group**: ${{ secrets.RESOURCE_GROUP }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "View logs: \`az containerapp logs show --name ${{ secrets.CONTAINER_APP_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }} --follow\`" >> $GITHUB_STEP_SUMMARY
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,23 @@
- Frontend: React 18, Vite, FluentUI components, feature-first structure under `frontend/src/features`
- Tests: Playwright E2E (`tests/e2e/app.spec.js`, `tests/e2e/ollama.spec.js`)

## 🚀 Deploy to Azure (5-10 minutes)

Want to deploy this app to production? We've got you covered!

**Quickest method**: `./azure-deploy.sh` - One command deploys everything to Azure Container Apps.

📖 **[Complete Azure Deployment Guide](docs/DEPLOY_AZURE.md)** - Step-by-step instructions for:
- Azure Container Apps (recommended)
- Azure App Service
- CI/CD with GitHub Actions
- Environment configuration

## Documentation

All deep-dive guides now live under `docs/` for easier discovery:

- [🚀 **Azure Deployment**](docs/DEPLOY_AZURE.md) – **quickest way to deploy on Azure** (5-10 minutes)
- [Ubuntu Installation Guide](docs/INSTALL_UBUNTU.md) – complete prerequisites installation for Ubuntu 22.04 LTS
- [Quick Start](docs/QUICKSTART.md) – fastest path from clone to running servers
- [Learning Guide](docs/LEARNING.md) – principles behind the architecture and code style
Expand Down
Loading