是否可以使用 Google App Engine 托管多个应用程序? [英] Is there possibility to host multiple applications with Google App Engine?

查看:23
本文介绍了是否可以使用 Google App Engine 托管多个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否需要为每个新的 Google App Engine 应用创建新项目?或者有没有其他方法可以在一个项目中拥有多个应用程序?

Do I need to create for each new Google App Engine app new project? Or is there other way to have multiple apps in one project?

删除了额外问题"

推荐答案

这可以通过 services 轻松完成.当您部署到 App Engine 时,请使用如下一行定义 app.yaml 文件:service: my-second-app

This is easily done with services. When you deploy to App Engine define your app.yaml file with a line like: service: my-second-app

为另一个 Node.js 服务完成 app.yaml 文件:

Complete app.yaml file for another Node.js service:

service: my-second-app
runtime: nodejs
env: flex
automatic_scaling:
   min_num_instances: 1

部署时,请从包含 app.yaml 文件的目录执行:

When you deploy, do it from the directory containing your app.yaml file:

gcloud app deploy

或者,如果您想在 yaml 文件中为您的第二个应用定义配置:

Or if you want to define your configuration in a yaml file just for your seond app:

gcloud app deploy my-second-app.yaml

新服务将与您的 default 服务一起部署,并将获得它自己的 URL,例如:

The new service will be deployed along side your default service and will get it's own URL like:

https://my-second-app-dot-my-project-name.appspot.com

这篇关于是否可以使用 Google App Engine 托管多个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆