Firebase托管多个域中的多个目录 [英] Firebase hosting with multiple directories at multiple domains

查看:45
本文介绍了Firebase托管多个域中的多个目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下设置,并且想知道如何最好地配置Firebase托管

I have the following setup and wanted to know how to best configure Firebase hosting

我有一个/build目录的仓库,其中包含三个子目录:

I have a repo with the /build directory with three subdirectories:

  • /build/a
  • /build/b
  • /build/c

我想在prod和dev中将每个目录都提供在其自己的域(或域)中,例如:

I'd like to serve each directory at its own domain (or domain) in both prod and dev like:

  • /一个
    • 产品:foo.com和www.foo.com
    • 开发:dev.foo.com
    • /a
      • Prod: foo.com and www.foo.com
      • Dev: dev.foo.com
      • 产品:b.foo.com
      • 开发:b.dev.foo.com
      • 产品:c.foo.com
      • 开发:c.dev.foo.com

      似乎唯一的方法是为每个部署的目录(总共6个)创建一个单独的Firebase项目,为每个目录(共3个)创建一个单独的firebase.json.

      It seems like the only way to do this is to create a separate Firebase project for each deployed directory (6 total), with a separate firebase.json for each directory (3 total)

      有更好的方法吗?

      谢谢

      推荐答案

      这将需要设置六个项目(每个prod/dev环境一个项目)和三个firebase.json文件.您可以将多个域与一个站点相关联,但是目前在同一项目中不能有多个站点.这是我们将来要寻求支持的内容,但是目前没有任何消息.

      This would require setting up six projects (one for each prod/dev environment) and three firebase.json files. You can associate multiple domains with a single site, but at present you cannot have multiple sites in the same project. This is something that we're looking into supporting in the future, but there's nothing to announce at this time.

      这篇关于Firebase托管多个域中的多个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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