Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
141 views
in Technique[技术] by (71.8m points)

Is there a URL for the latest version of a google cloud app engine deploy?

I've recently done a UI update for my website, the backend is all identical. I want to access the latest deploy (with the no-promote flag) from 'beta.my-website.com' but still access the 'normal' site from 'my-website.com'. Ideally this would dynamically serve the latest version, but if not could I set it statically to the URL with project ID? I have bought my domain from 123reg. Is there a way to direct to the latest version regardless of it's traffic serving status?

TL;DR Can you set up a 'beta' site at beta.mywebsite.com while still being able to access the live version on www.mywebsite.com on google cloud?

Any help would be greatly appreciated.

Thanks!

question from:https://stackoverflow.com/questions/65928580/is-there-a-url-for-the-latest-version-of-a-google-cloud-app-engine-deploy

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't think that can be done like that.

You could deploy to a different appengine project by putting a different project id and then have beta.mywebsite.com route to that project instead. The nice thing about this option is everything else would be isolated (i.e. no chance of your beta changes causing bad data in your production database, or tasks in your queues)

Another option would be to deploy to a different service within your project and use your dispatch.yaml to route beta.mywebsite.com to it https://cloud.google.com/appengine/docs/standard/python3/reference/dispatch-yaml

A third option would be to put beta as your version-id, and have your DNS redirect beta.mywebsite.com to beta-dot-your_project_id.appspot.com. However, when the user goes to beta.mywebsite.com they would ultimately see beta-dot-your_project_id.appspot.com in the URL bar. Also, when you're ready to go live, you would want to redeploy and promote that new version id and not promote the beta version-id.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...