简体   繁体   English

如何在谷歌云中部署我的 php 代码?

[英]How to deploy my php code in google cloud?

I wrote a PHP code to retrieve data from big query and now i want to deploy it to google cloud.我写了一个 PHP 代码来从大查询中检索数据,现在我想将它部署到谷歌云。 I installed gcloud sdk and gcloud app deploy code in cmd.我在 cmd 中安装了 gcloud sdk 和gcloud app deploy代码。 But it shows the following error.但它显示以下错误。 在此处输入图像描述

Thank you.谢谢你。 That was my fault.那是我的错。 This error happen when the app engine doesn't work.当应用程序引擎不工作时会发生此错误。 So first of all we must go to the app engine and run it.所以首先我们必须 go 到应用程序引擎并运行它。 Then we can deploy the code to cloud platform.然后我们可以将代码部署到云平台。

The last error message says that it's not possible to deploy to a stopped app.最后一条错误消息表明无法部署到已停止的应用程序。 I never used Google App Engine before but I would suggest that you take a look at your app's state on google app engine first.我以前从未使用过 Google App Engine,但我建议您先在 Google App Engine 上查看您的应用程序的 state。 It may be in a sleeping state or something similar.它可能在休眠的 state 或类似的东西中。

Sometimes, low traffic web app on Platform As A Service are put in hibernation mode (I'm not sure if that's the right word) after a certain time without usage.有时,平台即服务上的低流量 web 应用程序会在一段时间未使用后进入休眠模式(我不确定这是否正确)。

I don't think the error has something to do with your app.yml or any other of your files anymore.我认为该错误不再与您的 app.yml 或您的任何其他文件有关。 Check your app's state on GAE first and try to deploy again.首先在 GAE 上检查您的应用的 state 并尝试再次部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM