Google Cloud App Engine-部署多个环境 [英] Google Cloud App Engine - Deploy multiple environments

查看:67
本文介绍了Google Cloud App Engine-部署多个环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的应用程序,我在GCP上有两种不同的环境:暂存和生产.我的静态Angular应用程序当前已部署在GAE上.现在,我想知道是否可以使用两个不同的URL分别部署这两个环境?还是有另一个更适合这种设置的解决方案?

For my application, I have two different environments on GCP: staging and production. My static Angular application is currently deployed on GAE. Now I'm wondering if it's possible to deploy these two environments separately with two different URL's? Or is there another solution better suited for such a setup?

否则,我可能不得不切换回Google Cloud Run.

If not I'll probably have to switch back to Google Cloud Run.

谢谢.

推荐答案

2个环境= 2个项目!这样更容易,而且您已经重复了App Engine免费套餐(每个项目)

2 environments = 2 projects! It's easier and you have App Engine free tier duplicated (per projet)

如果您在同一GAE上部署了两次相同的程序包(因此,在同一项目上),则每次部署都需要有一个app.yaml.因此,您的登台部署管道与生产部署管道并不完全相同.而且URL格式也.非默认服务的URL带有服务名称前缀.而且您应该在处理程序定义,调度程序(如果有),....

If you deploy 2 time the same package on the same GAE (so, on the same project), you need to have a app.yaml per deployment. And thus your staging deployment pipeline isn't exactly the same as the production deployment pipeline. And the URL format also. The non default service has his URL prefixed with the service name. And you should have issues with handlers definitions, the scheduler (if you have one),....

否,最简单的方法是每个环境有1个项目

No, the easiest is to have 1 project per environment

这篇关于Google Cloud App Engine-部署多个环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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