有没有办法指定将部署我的 Firebase 功能的区域/区域。
实际上,我在文档中没有找到任何相关信息,我的功能始终部署到 us-central1,但我想将它放在 eu-central1 上...
是否可以在 Firebase - 配置 - 文件中进行设置?
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
我还查看了 cli 选项,但在那里没有找到任何内容。
Firebase 项目本身已正确设置为欧洲区域 o.O
提前致谢
最佳答案
火力士在这里
更新 (2018-07-25):
现在可以在 Firebase 中为您的 Cloud Functions 指定区域,您可以在代码中指定该区域并部署更改。例如。:
exports.myStorageFunction = functions
.region('europe-west1')
.storage
.object()
.onFinalize((object) => {
// ...
});
有关完整详细信息,请参阅 Firebase documentation on Cloud Functions locations (从我得到上述片段的地方)和 modifying the region of a deployed function .
关于firebase 部署到自定义区域 (eu-central1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43569595/