You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding `functionsNodeVersion` option to allow configuration of Cloud Functions Node.js version
* Adding `functionsRuntimeOptions` option to allow configuration of memory, timeout, VPC connectors, etc.
* Adding `firebaseProject` option to allow finer grain deployments
* Fixing NPM version parsing for external dependencies
* Fixing the bundle all warning
Co-authored-by: George <[email protected]>
Copy file name to clipboardExpand all lines: docs/deploy/getting-started.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,3 +88,56 @@ We'll create the function and a `package.json` in your project output directory.
88
88
## Step 3: customization
89
89
90
90
To customize the deployment flow, you can use the configuration files you're already familiar with from `firebase-tools`. You can find more in the [firebase documentation](https://firebase.google.com/docs/hosting/full-config).
91
+
92
+
### Configuring Cloud Functions
93
+
94
+
Setting `functionsNodeVersion` and `functionsRuntimeOptions` in your `angular.json` allow you to custimze the version of Node.js Cloud Functions is running and run-time settings like timeout, VPC connectors, and memory.
If you have multiple build targets and deploy targets, it is possible to specify them in your `angular.json` or `workspace.json`.
114
+
115
+
It is possible to use either your project name or project alias in `firebaseProject`. The setting provided here is equivalent to passing a project name or alias to `firebase deploy --project projectNameOrAlias`.
116
+
117
+
The `buildTarget` simply points to an existing build configuration for your project. Most projects have a default configuration and a production configuration (commonly activated by using the `--prod` flag) but it is possible to specify as many build configurations as needed.
118
+
119
+
You may specify a `buildTarget` and `firebaseProject` in your `options` as follows:
120
+
121
+
```json
122
+
"deploy": {
123
+
"builder": "@angular/fire:deploy",
124
+
"options": {
125
+
"buildTarget": "projectName:build",
126
+
"firebaseProject": "developmentProject"
127
+
},
128
+
"configurations": {
129
+
"production": {
130
+
"buildTarget": "projectName:build:production",
131
+
"firebaseProject": "productionProject"
132
+
}
133
+
}
134
+
}
135
+
```
136
+
137
+
The above configuration specifies the following:
138
+
139
+
1.`ng deploy` will deploy the default project with default configuration.
140
+
2.`ng deploy projectName` will deploy the specified project with default configuration.
141
+
3.`ng deploy projectName --prod` or `ng deploy projectName --configuration='production'` will deploy `projectName` with production build settings to your production environment.
142
+
143
+
All of the options are optional. If you do not specify a `buildTarget`, it defaults to a production build (`projectName:build:production`). If you do not specify a `firebaseProject`, it defaults to the first matching deploy target found in your `.firebaserc` (where your projectName is the same as your Firebase deploy target name). The `configurations` section is also optional.
0 commit comments