简体   繁体   English

如何在Google App Engine的克隆存储库中部署应用程序?

[英]How can I deploy my application within a cloned repository on Google App Engine?

I'm using a node package to run a web server (among other benefits) for my project. 我正在使用节点程序包为我的项目运行Web服务器(还有其他好处)。 The catch is, my project is only loaded on the server if it's within a directory of the node package. 问题是,如果我的项目位于节点包的目录中,则仅将其加载到服务器上。 In other words, my directory structure looks like this: 换句话说,我的目录结构如下所示:

<npm_pkg>/
  <npm_pkg_src>/
  clients/
    <my_project_name>/
      <my_project_src>

I would like to be able to use standard deployment processes for my project (eg gcloud app deploy , Travis continuous deployment, etc.), but I need to run my project from within a subdirectory of the larger package. 我希望能够对我的项目使用标准的部署过程(例如gcloud app deploy ,Travis连续部署等),但是我需要从较大包的子目录中运行我的项目。 Is there an easy way to force a git clone <pkg> during a build step and deploy my project in the target subdirectory? 有没有一种简单的方法可以在构建步骤中强制git clone <pkg>并将我的项目部署到目标子目录中?

I'm pretty new to CI/CD, but I tried to search around for similar examples and couldn't find any. 我对CI / CD还是很陌生,但是我尝试搜索类似的示例,但找不到任何示例。 Note: the parent project is not owned by me and thus I can't just use submodules without forking it (and I have no intention to alter it in any way). 注意:父项目不是我所有的,因此我不能不分叉就使用子模块(并且我无意以任何方式对其进行更改)。 I also strictly just want to be able to trigger deploys based on my actual project's repository, if possible, whereas submodules would involve maintaining two and committing features twice (from what I understand). 我还严格只希望能够在可能的情况下基于实际项目的存储库触发部署,而子模块将涉及维护两次并提交两次功能(据我了解)。

Any help is much appreciated. 任何帮助深表感谢。

Edit: I forgot to mention that as part of this configuration I also need to run my server script from the root of the parent package. 编辑:我忘了提到,作为此配置的一部分,我还需要从父程序包的根目录运行服务器脚本。 IOW, my package.json 's start script will look like "start": "cd ../.. && npm start" . 哎呀,我的package.json的启动脚本看起来像"start": "cd ../.. && npm start" Just in case it's relevant. 以防万一它是相关的。

This might be what you're looking for: CI/CD with App Engine 这可能是您要寻找的: 带有App Engine的CI / CD

Clone from the repo and deploy from the subdirectory it is located, and Cloud Source Repositories can automate the whole process for you 从存储库克隆并从其所在的子目录进行部署, Cloud Source Repository可以为您自动化整个过程

I would also suggest you keep services separate, this will make things clearer for you and others that will/might be working on the project with you 我还建议您将服务分开,这样可以使您和其他可能/可能与您一起进行项目工作的人更清楚

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

相关问题 如何将 Node HTTP/2 服务器部署到 Google App Engine? - How can I deploy a Node HTTP/2 server to Google App Engine? 无法在Google App引擎上部署我的reactjs webpack应用程序 - Cannot deploy my reactjs webpack application on google app engine 如何将 socket.io 部署到 Google App Engine? - How do I deploy socket.io to Google App Engine? 如何在Google Compute Engine上部署节点应用程序? - How do I deploy a node app on Google Compute Engine? 如何在Google App Engine上部署1个实例 - How to deploy 1 instance on Google App Engine 将节点应用程序部署到Google App Engine标准环境 - Deploy node application to Google App Engine standard environment 我无法禁用Google App Engine的http请求 - I can't disable http requests for my Google App Engine 如何使用 Docker 映像将 Node.js HTTP/2 应用程序部署到 Google Compute Engine 上? - How do I deploy a Node.js HTTP/2 application onto Google Compute Engine using a Docker image? 如何在我的本地计算机上运行和更改克隆的应用程序? - How can I run and make changes to a cloned app on my local machine? 当我在Google云应用引擎上使用Markojs部署应用程序Nodejs和Markojs时,出现错误“ EROFS:只读文件系统…”。 - When I deploy the application Nodejs with Markojs at google cloud app engine, I receive the error “EROFS: read-only file system…'”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM