How to upload website on Firebase hosting without attaching storage.rules & firestore.rules files?

Viewed 246

Today I have uploaded my website on Firebase hosting and in the process of doing that I have to create two rules files, one is storage.rules and another one is firestore.rules. I also have to create a firestore.indexes.json file. But I can remember previously I didn't have to create any such file while uploading another website on Firebas host.
I need to get rid of these 3 files, because every time I upload my files It changed to private rules for both storage and cloud which is unnecessary for me. I need to remain them public. Besides that I can't open these 2 rules files to edit (using Mac) just at least to see what is inside of them. How can I do it, Thanks!

1 Answers

It sounds like you use the Firebase CLI to initialize several products in the same project, including Cloud Storage and Firestore. If you don't want to work with these other products in your project files, you shouldn't select them during initialization.

The easiest thing to do would be to start over in a new directory and initialize only the products you want to use. It sounds like that's only Firebase Hosting.

You could also edit firebase.json and remove the products you don't want to use any more.

If you do want to work with Storage and Firestore, but you only want to deploy to Hosting, then just use firebas deploy --only hosting.

Related