如何使用Firestore创建多环境数据库 [英] How to create multi environment DB's with Firestore

查看:97
本文介绍了如何使用Firestore创建多环境数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究如何在Firebase中创建多个Firestore实例,我需要用于生产,暂存和开发的不同Db.我阅读了文档,似乎只需要修改"Google-services.json";文件中的应用程序.我没有得到的是我应该修改什么以及它在控制台中的外观.

I've been looking at how to create multiple Firestore instances in Firebase, I need different Db's for prod, staging and development. I read the documentation and seems that I only need to modify the "Google-services.json" file in the applications. what I don't get is what should I modify and how that would look in the console.

  • 我要在同一项目中看到不同的实例吗?

  • Am I going to see different instances in the same project?

我需要为每个环境创建不同的项目并修改文件中的那些值吗?

I need to create different projects for every environment and modify those values in the file?

如果我需要测试一些需要在所有环境中进行测试的东西,而所有这些都需要Blaze来运行该测试,我是否有 支付三倍?

If I need to test something that requires testing in all environments and all of them require Blaze to run that test do I have to pay Triple?

预先感谢

推荐答案

Firebase不支持在单个项目中使用多个Firestore实例.

Firebase doesn't support the use of multiple Firestore instances in a single project.

Firebase团队强烈建议为您的每个环境创建不同的项目,以使它们分开.这可能意味着您将必须构建每个指向不同实例的不同应用程序,或者必须在运行时以某种方式配置应用程序以选择要使用的项目.

The Firebase team strongly recommends creating different projects for each of your environments to keep them separate. This probably means you will have to build different apps that each point to different instances, or you will have to somehow configure your app at runtime to select which project you want to work with.

只要您接受Spark计划的限制,就没有义务向您不想支付的任何项目添加账单.

There is no obligation to add billing to any of the projects you don't want to pay for, as long as you accept the limitations of the Spark plan.

这篇关于如何使用Firestore创建多环境数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆