简体   繁体   English

仅将构建的 React 应用程序部署到应用程序引擎

[英]Deploy only build react app to app engine

I managed to deploy correctly a react app to google app engine.我设法将反应应用程序正确部署到谷歌应用引擎。

The build folder is correctly served from app engine, but the deployment contains also all the other files.构建文件夹由 App Engine 正确提供,但部署还包含所有其他文件。

How can I deploy only the build folder?如何只部署构建文件夹?

You can add all the files and folder you do not want to deploy to the.gcloudignore file.您可以将所有不想部署的文件和文件夹添加到 .gcloudignore 文件中。 It's very similar to.gitignore for git. More on.gcloudignore here: https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore它与 git 的 .gitignore 非常相似。更多关于 .gcloudignore 的信息在这里: https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore

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

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