gpt4 book ai didi

Azure功能如何将应用程序设置从本地移动到服务器,反之亦然

转载 作者:行者123 更新时间:2023-12-03 05:49:49 27 4
gpt4 key购买 nike

我对 Azure 还不太熟悉。

问题是我正在开发 Azure Functions,有时我必须在本地工作(代码/测试等),有时则在 Azure 上工作。每次切换时,我都必须手动比较和更改应用程序设置。

有什么办法可以避免这种情况吗?如果我在本地运行,我可能会在没有手动的情况下从服务器获取最新版本,并且当我转到服务器 Azure 时可能会知道我的更改?

谢谢

最佳答案

是的,使用 Azure Functions Core Tools

Usage: func azure functionapp <action> [-/--options]

fetch-app-settings Retrieve App Settings from your Azure-hosted
Function App and store locally Aliases:
fetch-app-settings, fetch

Usage: func azure functionapp <action> [-/--options]

publish Publish the current directory contents to an
Azure Function App. Locally deleted files
are not removed from destination.

<FunctionAppName> Function App name

--publish-local-settings [-i] Updates App Settings for the
function app in Azure during deployment.

--publish-settings-only [-o] Only publish settings and skip the
content. Default is prompt.

--overwrite-settings [-y] Only to be used in conjunction with -i or -o.
Overwrites AppSettings in Azure with local
value if different. Default is prompt.

如果您愿意冒险的话,还可以对本地文件进行加密 -
运行 func settings 来获取使用情况。

关于Azure功能如何将应用程序设置从本地移动到服务器,反之亦然,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49121999/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com