Helper Commands

TaskCommand
List projectsgcloud projects list

Configuring cors

$ gcloud_auth
$ gcloud config set project flipdare-us-east4-prod
  • check storage is accessible and view existing cors
$ gcloud storage buckets list 
  • update cors
$ gcloud storage buckets update gs://flipdare-prod.firebasestorage.app --cors-file=cors.json
⠶Updating gs://flipdare-prod.firebasestorage.app/...
  Completed 1   

Functions

listing

$ gcloud functions list  --verbosity debug

delete

$  firebase functions:delete --force tr_dare_create

Firestore

IMPORTANT: Ensure the database is created in us-east4 to be close to AWS

Step 1: Create the Enterprise Database

You can create the new destination database using either the Firebase Console or the Firebase CLI. [4]

  • Via the Firebase Console: Go to your Firestore Database Console → Click Add database → Choose Enterprise edition → Select Firestore in Native mode.
  • Via the Firebase CLI: Execute the following terminal command to provision it instantly:
firebase firestore:databases:create YOUR_ENTERPRISE_DB_ID --location=YOUR_LOCATION --edition enterprise

Step 2: Rebuild Indexes and Configurations

You will need to manually set up:

  1. Firestore Security Rules on the new database instance.
  2. Search and Pipeline Indexes via the Google Cloud Console. (Note: Firestore Enterprise does not create single-field indexes automatically like Standard does, so you only create what you explicitly need).