student-hub / acs-upb-mobile

A mobile application for students at ACS UPB.
MIT License
27 stars 22 forks source link

Fix backups not running on dev project. #326

Closed IoanaAlexandru closed 2 years ago

IoanaAlexandru commented 2 years ago

There were some issues causing the backups to only work on the prod project, but not dev.

One, the buckets for the backups were not created, so I created acs-upb-mobile-dev-firestore-backups and acs-upb-mobile-dev-storage-backups and gave "Storage Administrator" permissions and the "Cloud Datastore Import Export Admin" role to the default service accounts that each function uses (acs-upb-mobile-dev@appspot.gserviceaccount.com, firebase-adminsdk-mgl5c@acs-upb-mobile-dev.iam.gserviceaccount.com) as per the docs here.

Second, the (prod) project ID was hardcoded in the storage script, so now it's read from environment variables instead.

I also added some relevant documentation.