Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
392 views
in Technique[技术] by (71.8m points)

google cloud functions - firebase deploy to custom region (eu-central1)

is there a way to specify the Region/Zone where my firebase functions will be deployed.

Actually i didn't found anything about that in the documentation and my functions are always deployed to us-central1 but i want to have it on eu-central1...

Is it possible to set it in the Firebase - Config - File?

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "public",
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

I also had a look on the cli options but i did not found anything there.

The Firebase Project itself is correctly set to an european Region o.O

thanks in advance

question from:https://stackoverflow.com/questions/43569595/firebase-deploy-to-custom-region-eu-central1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

firebaser here

Update (2018-07-25):

It is now possible to specify the region for your Cloud Functions in Firebase you specify that region in your code and deploy the change. E.g.:

exports.myStorageFunction = functions
    .region('europe-west1')
    .storage
    .object()
    .onFinalize((object) => {
      // ...
    });

For full details see the Firebase documentation on Cloud Functions locations (from where I got the above snippet) and modifying the region of a deployed function.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...