-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure.yaml
More file actions
69 lines (66 loc) · 2.99 KB
/
azure.yaml
File metadata and controls
69 lines (66 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
#
# Azure Developer CLI (azd) project for Children's Story Studio.
#
# Container Apps deployment — mirrors the structure of the sibling
# ai-marketing-campaign repo. The Bicep entrypoint (infra/main.bicep) is
# subscription-scoped and creates the resource group itself, so a fresh
# environment is a single `azd up` away.
#
# First-time setup (per environment):
# azd env new zavastory
# azd env set AZURE_LOCATION eastus2
# azd env set AZURE_FOUNDRY_RESOURCE_ID /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<account>
# azd env set AZURE_SPEECH_RESOURCE_ID /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<account>
# azd env set AZURE_SPEECH_REGION eastus2
# azd env set AZURE_STORAGE_ACCOUNT_NAME stzavastory<random6>
# azd env set FOUNDRY_PROJECT_ENDPOINT https://<account>.services.ai.azure.com/
# azd up
#
# Optional: Microsoft Entra Easy Auth in front of the app
# bash infra/scripts/create_entra_app_reg.sh \
# --fqdn $(azd env get-value SERVICE_APP_FQDN)
# azd env set ENABLE_ENTRA_AUTH true
# azd env set ENTRA_CLIENT_ID <from script>
# azd env set ENTRA_CLIENT_SECRET <from script>
# azd env set ENTRA_TENANT_ID <from script>
# azd provision
name: childrens-story-studio
metadata:
template: childrens-story-studio@1.0.0
services:
app:
project: .
language: docker
host: containerapp
docker:
path: ./Dockerfile
# Container Apps runs amd64; build with the right platform so we don't
# accidentally push an arm64 image from a Mac dev box. `remoteBuild: true`
# offloads the build to ACR Tasks so a local Docker daemon is not
# required and platform headaches go away entirely.
platform: linux/amd64
remoteBuild: true
# Bind to the Container App created by Bicep. The Bicep output
# SERVICE_APP_NAME holds the resource name (default: <env>-app).
resourceName: ${SERVICE_APP_NAME}
hooks:
postprovision:
posix:
shell: sh
run: |
echo "[postprovision] Provision complete."
echo "[postprovision] App will self-seed demo stories on first boot via seed_demo_stories_if_empty()."
echo "[postprovision] App URL: ${SERVICE_APP_URI}"
if [ "${ENTRA_AUTH_ENABLED}" = "True" ] || [ "${ENTRA_AUTH_ENABLED}" = "true" ]; then
echo "[postprovision] Entra Easy Auth ENABLED. Login URL: ${LOGIN_URL}"
fi
windows:
shell: pwsh
run: |
Write-Host "[postprovision] Provision complete."
Write-Host "[postprovision] App will self-seed demo stories on first boot via seed_demo_stories_if_empty()."
Write-Host "[postprovision] App URL: $env:SERVICE_APP_URI"
if ($env:ENTRA_AUTH_ENABLED -eq "True" -or $env:ENTRA_AUTH_ENABLED -eq "true") {
Write-Host "[postprovision] Entra Easy Auth ENABLED. Login URL: $env:LOGIN_URL"
}