Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

dev: Add Makefile step "sync-local-config" to ease config creation

Clémence Lesné2e0011b190a7
diff --git a/Makefile b/Makefile
index 716d506..118cb46 100644
--- a/Makefile
+++ b/Makefile
@@ -195,3 +195,7 @@ sbom:
--source-version $(version_full) \
--output spdx-json=./sbom-reports/$(version_full).json \
.
+
+sync-local-config:
+ @echo "📥 Copying remote CONFIG_JSON to local config..."
+ az functionapp config appsettings list --name $(function_app_name) --resource-group $(name_sanitized) --query "[?name=='CONFIG_JSON'].value" --output tsv | yq --sort-keys --yaml-output > config.yaml
diff --git a/README.md b/README.md
index 7c3508a..1a572b1 100644
--- a/README.md
+++ b/README.md
@@ -281,7 +281,9 @@ Now that the prerequisites are configured (local + Azure), the deployment can be
#### 1. Create the light config file
-File is named `config.yaml`:
+Local config file is named `config.yaml`. It will be used by install scripts (incl. Makefile and Bicep) to configure the Azure resources.
+
+Fill the file with the following content (must be customized for your need):
```yaml
# config.yaml
@@ -343,12 +345,9 @@ make logs name=my-rg-name
> ```
> [!TIP]
-> If you already deployed the application to Azure and if it is working, you can:
->
-> - Copy the configuration from the Azure Function App to your local machine by using the content of the `CONFIG_JSON` application setting
-> - Then convert it to YAML format
+> If the application is already deployed on Azure, you can run `make name=my-rg-name sync-local-config` to copy the configuration from the Azure Function App to your local machine.
-File is named `config.yaml`:
+Local config file is named `config.yaml`:
```yaml
# config.yaml