Correction related to the Azure Function deployment.
This commit is contained in:
@@ -181,7 +181,7 @@ az role assignment create \
|
|||||||
--scope /subscriptions/<subscription-id>/resourceGroups/<dns-resource-group>
|
--scope /subscriptions/<subscription-id>/resourceGroups/<dns-resource-group>
|
||||||
```
|
```
|
||||||
|
|
||||||
**6. Configure application settings**
|
**6. Configure production application settings**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
az functionapp config appsettings set \
|
az functionapp config appsettings set \
|
||||||
@@ -191,19 +191,22 @@ az functionapp config appsettings set \
|
|||||||
"ACME_KEYVAULT_URL=https://<keyvault-name>.vault.azure.net" \
|
"ACME_KEYVAULT_URL=https://<keyvault-name>.vault.azure.net" \
|
||||||
"ACME_SUBSCRIPTION_ID=<subscription-id>" \
|
"ACME_SUBSCRIPTION_ID=<subscription-id>" \
|
||||||
"ACME_RESOURCE_GROUPS=<dns-resource-group>" \
|
"ACME_RESOURCE_GROUPS=<dns-resource-group>" \
|
||||||
"ACME_CONTACT_EMAIL=<email>"
|
"ACME_CONTACT_EMAIL=<email>" \
|
||||||
|
"ACME_SCHEDULE=0 0 2 * * *"
|
||||||
```
|
```
|
||||||
|
|
||||||
**7. Build and deploy**
|
**7. Build and deploy**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run build
|
npm run build
|
||||||
func azure functionapp publish <function-app-name>
|
func azure functionapp publish <function-app-name> --no-build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`--no-build` tells `func` to skip its own build step since we already compiled the TypeScript output. To also push application settings from `local.settings.json` in the same step, append `--publish-local-settings --overwrite-settings`. This is useful for the initial deployment or when settings and code change together.
|
||||||
|
|
||||||
### Local testing
|
### Local testing
|
||||||
|
|
||||||
Create a `local.settings.json` file at the project root (it is gitignored):
|
Create `local.settings.json` at the project root (gitignored) and fill in your values:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user