2

As suggested here: "https://firebase.googleblog.com/2016/07/deploy-to-multiple-environments-with.html", one should use multiple projects (preferably name-differentiated into dev, staging, production, etc) to be able to have a test environment like that on Firebase Hosting.

But again, this document speaks about this approach in the context of Firebase Hosting. Is the same to be followed for Firebase Cloud Functions, if I do not want to update my already live, "production" function before testing the "development" version, or is there an alternate approach which can be followed?

I don't think I can simply add another Firebase Function, as code would still remain shared between the "production" version and the "development" version, which can cause problems in the "production" version.

2
  • I'm confused as to how to set this up? Did you ever get it working? I only see docs for setting up firebase target:apply hosting dev my-dev-project. Doing this with functions does not work. Am I missing something? Commented Nov 11, 2019 at 18:14
  • actually I ended up migrating to AWS Commented Mar 19, 2020 at 5:27

1 Answer 1

5

The use of dedicated projects for each enviornment is the same recommended practice for all Firebase products.

Sign up to request clarification or add additional context in comments.

4 Comments

so then I also need to add more projects, with the same plan?
Each project doesn't have to be on the same plan. It's very possible that for development, the free quota is good enough. But you have to figure that out for yourself.
Yeah, but outbound traffic is not possible on Spark and I needed that.. thanks anyways
Yes, you'll have to be on Blaze for that, but the good news is that the free tier limits are still free, and you still might not incur any costs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.