问题描述
如何从Google Cloud App Engine中的单个项目中以相同或不同的语言/运行时部署多个应用程序?
How can I deploy multiple applications from same or different language/runtime originating from a single project in google cloud app engine?
推荐答案
将多个服务部署到Google Cloud App引擎.
在应用程序根目录中创建以下文件
Deploying Multiple Services to Google Cloud App engine.
Create the following files in the app root directory
创建包含以下内容的app.yaml文件:
Create app.yaml file with content:
runtime: nodejs8
service: default
创建包含内容的myserviceone.yaml文件:
Create myserviceone.yaml file with content:
runtime: nodejs8
service: myserviceone
创建包含内容的myservicetwo.yaml文件:
Create myservicetwo.yaml file with content:
runtime: nodejs8
service: myservicetwo
使用命令部署
gcloud app deploy --project your_project_id app.yaml myserviceone.yaml myservicetwo.yaml
这将部署默认服务以及我的服务一和我的服务二.查看您的云控制台.您可以使用
This will deploy the default service as well as my service one and my service two. Check out your cloud console.You can access them using
https://myserviceone-dot-yourProjectID.appspot.com/或 http://myserviceone.yourProjectID.appspot.com/
https://myservicetwo-dot-yourProjectID.appspot.com/或 http://myservicetwo.yourProjectID.appspot.com/
这篇关于从同一项目部署多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!