firebase 部署到自定义区域(eu-central1) [英] firebase deploy to custom region (eu-central1)
问题描述
有没有办法指定将部署我的 Firebase 功能的区域/区域.
is there a way to specify the Region/Zone where my firebase functions will be deployed.
实际上我在文档中没有找到任何相关内容,我的功能总是部署到 us-central1 但我想将它放在 eu-central1...
Actually i didn't found anything about that in the documentation and my functions are always deployed to us-central1 but i want to have it on eu-central1...
是否可以在 Firebase - Config - File 中设置?
Is it possible to set it in the Firebase - Config - File?
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
我还查看了 cli 选项,但没有找到任何内容.
I also had a look on the cli options but i did not found anything there.
Firebase 项目本身已正确设置为欧洲区域 o.O
The Firebase Project itself is correctly set to an european Region o.O
提前致谢
推荐答案
firebaser here
更新(2018-07-25):
Update (2018-07-25):
现在可以在 Firebase 中为您的 Cloud Functions 指定区域,您可以在代码中指定该区域并部署更改.例如:
It is now possible to specify the region for your Cloud Functions in Firebase you specify that region in your code and deploy the change. E.g.:
exports.myStorageFunction = functions
.region('europe-west1')
.storage
.object()
.onFinalize((object) => {
// ...
});
有关详细信息,请参阅 关于 Cloud Functions 位置的 Firebase 文档(我从那里获得以上代码段)和修改已部署函数的区域.
For full details see the Firebase documentation on Cloud Functions locations (from where I got the above snippet) and modifying the region of a deployed function.
这篇关于firebase 部署到自定义区域(eu-central1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!