【发布时间】:2021-12-06 17:48:49
【问题描述】:
我一直在关注本指南 https://medium.com/firebase-developers/hosting-flask-servers-on-firebase-from-scratch-c97cfb204579,但我被 firebase 的 ./node_modules/.bin/firebase serve 命令困住了
我成功地能够使用 Cloud Run 部署项目并获得适用于该站点的服务 url,但是当我尝试在本地提供它时,它在运行到 localhost:5000 时在静态页面上产生此错误:
尝试处理代理重写时出现问题:查找 Cloud Run 服务的 URL 时出错:FirebaseError:HTTP 错误:404,项目中区域“us-central1”中类型“SERVICE”的资源“flask-fire” 'cjcflaskapp10192021' 不存在。
这是我的 firebase.json 文件。
{
"hosting": {
"public": "static",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [{
"source": "**",
"run": {
"serviceId": "flask-fire"
}
}]
}
}
【问题讨论】:
-
您尝试从您的计算机调用 localhost:5000?但是你应该调用 Cloud Run 服务不是吗?
标签: python flask google-cloud-run