From 00807a82cbe1e11c888609239c6bbc7460280269 Mon Sep 17 00:00:00 2001 From: Leonardo Ortiz Date: Mon, 23 Jun 2025 12:17:28 -0300 Subject: [PATCH 1/3] docs: add section on configuring different environments for Cloud Functions --- src/frameworks/docs/frameworks-overview.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frameworks/docs/frameworks-overview.md b/src/frameworks/docs/frameworks-overview.md index a8b1d3e6ff4..47e47c14553 100644 --- a/src/frameworks/docs/frameworks-overview.md +++ b/src/frameworks/docs/frameworks-overview.md @@ -50,6 +50,10 @@ live site: 1. Run `firebase deploy` from the terminal. 2. Check your website on: `SITE_ID.web.app` or `PROJECT_ID.web.app` (or your custom domain, if you set one up). +## Configure different environments + +Cloud Functions [parameterized configuration](https://firebase.google.com/docs/functions/config-env?gen=2nd#params) can be used to leverage `.env` files based on your project ID, which can be used to deploy your project to different environments, like staging and production. + ## Next steps See the detailed guide for your preferred framework: From 8df92fe5d22d442e5aec1fc37d10be506f8cca33 Mon Sep 17 00:00:00 2001 From: Leonardo Ortiz Date: Fri, 11 Jul 2025 02:03:35 +0200 Subject: [PATCH 2/3] address feedback - add example - adjust cloud functions documentation link --- src/frameworks/docs/frameworks-overview.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frameworks/docs/frameworks-overview.md b/src/frameworks/docs/frameworks-overview.md index 47e47c14553..6b6296e9c21 100644 --- a/src/frameworks/docs/frameworks-overview.md +++ b/src/frameworks/docs/frameworks-overview.md @@ -52,7 +52,13 @@ live site: ## Configure different environments -Cloud Functions [parameterized configuration](https://firebase.google.com/docs/functions/config-env?gen=2nd#params) can be used to leverage `.env` files based on your project ID, which can be used to deploy your project to different environments, like staging and production. +You can deploy multiple sets of environment variables for different project environments, such as staging and production. + +* If you have a `staging` project alias, you can deploy environment variables from a `.env.staging` file. +* If you have a `production` project alias, you can deploy environment variables from a `.env.production` file. +* If you have a project with id `PROJECT_ID`, you can deploy environment variables from a `.env.PROJECT_ID` file. + +See the [Cloud Functions documentation](https://firebase.google.com/docs/functions/config-env?gen=2nd#deploying_multiple_sets_of_environment_variables) for a detailed guide. ## Next steps From 894c7d768176649bb21da0a08eb4af235bc56476 Mon Sep 17 00:00:00 2001 From: Leonardo Ortiz Date: Mon, 21 Jul 2025 14:12:08 -0300 Subject: [PATCH 3/3] Update src/frameworks/docs/frameworks-overview.md --- src/frameworks/docs/frameworks-overview.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frameworks/docs/frameworks-overview.md b/src/frameworks/docs/frameworks-overview.md index 6b6296e9c21..a5c6afe4702 100644 --- a/src/frameworks/docs/frameworks-overview.md +++ b/src/frameworks/docs/frameworks-overview.md @@ -54,6 +54,8 @@ live site: You can deploy multiple sets of environment variables for different project environments, such as staging and production. +Like Cloud Functions for Firebase, this tooling supports the [dotenv](https://www.npmjs.com/package/dotenv) file format for loading environment variables specified in a .env file. + * If you have a `staging` project alias, you can deploy environment variables from a `.env.staging` file. * If you have a `production` project alias, you can deploy environment variables from a `.env.production` file. * If you have a project with id `PROJECT_ID`, you can deploy environment variables from a `.env.PROJECT_ID` file.