firebase 部署到自定义区域 (eu-central1)

标签 firebase google-cloud-functions

有没有办法指定将部署我的 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/

相关文章:

通过 HTTP 触发时 Firebase 云函数执行两次

Android Firebase 崩溃不会在第三方库(或 *.aar)中发送崩溃报告

java - 未触发 Firebase 异步上传到 Cloud Firestore

ios - 如何从 Firebase 身份验证登录的 NSError 中获取错误消息

firebase - getter 'email' 被调用为 null

node.js - TypeError : result[0]. 数据不是函数

javascript - Firebase 云功能中的权限被拒绝

python - 如何通过 Cloud Functions 调度用 Python 编写的 Dataflow 管道?

node.js - 如何从服务器端的 Firebase 数据库检索最后创建的对象

firebase - 在 firebase 函数部署上对 google cloud secret 的权限被拒绝