w--
w--

Reputation: 6697

firebase cli: firestore rules - how to specify the file to deploy

in the docs
https://firebase.google.com/docs/firestore/security/get-started#use_the_firebase_cli

I know i can deploy rules using:

firebase deploy --only firestore:rules

is there a way for me to specify the location of the rules file?

Upvotes: 18

Views: 8991

Answers (1)

Michael Bleigh
Michael Bleigh

Reputation: 26343

You cannot specify the rules file location in a command-line flag, but you can set it in firebase.json:

{
  "firestore": {
    "rules": "path/to/your/firestore.rules"
  }
}

Upvotes: 21

Related Questions