简体   繁体   English

正在部署的 GAE 服务未路由到正确的 URL 前缀

[英]GAE service being deployed is not routing to the correct URL prefix

I'm deploying different versions of an app I made, and it turns out that some people have really enjoyed the older (simpler) version of the app over newer features I'm rolling out.我正在部署我制作的应用程序的不同版本,事实证明,有些人真的很喜欢旧版(更简单)的应用程序,而不是我推出的新功能。

I figured with services that this wouldn't be a problem in GAE, I'd just offer older versions of the app using different domain prefixes (eg, summer2022.myapp.com", "winter2022.myapp.com", etc.) and allow users to use whichever version they prefer, with the acknowledgement that I won't provide updates/maintain older versions.我认为在 GAE 中这不会成为问题的服务,我只是提供使用不同域前缀的应用程序的旧版本(例如,summer2022.myapp.com、“winter2022.myapp.com”等)并允许用户使用他们喜欢的任何版本,并承认我不会提供更新/维护旧版本。

This went well at first - I deployed a "classic" version of the original app (classic service), and have an updated v2 out (default service), but now I'm trying to release the next version as a beta (beta service) and it's not routing properly.起初进展顺利——我部署了原始应用程序的“经典”版本(经典服务),并更新了 v2(默认服务),但现在我正尝试将下一个版本发布为测试版(测试版服务) ) 并且它没有正确路由。 I've checked the DNS for beta and classic and they're set up the same way.我已经检查了 DNS 的测试版和经典版,它们的设置方式相同。 I think I'm rolling the app.yaml and dispatch.yaml out correctly (gcloud app deploy ).我想我正在正确推出 app.yaml 和 dispatch.yaml (gcloud app deploy)。 Just hoping someone can see something I'm missing.只是希望有人能看到我遗漏的东西。

dispatch.yaml调度.yaml

dispatch:
  - url: "audiologysimulator.com/*"
    service: default

  - url: "classic.audiologysimulator.com/*"
    service: classic
    
  - url: "beta.audiolgysimulator.com/*"
    service: beta

app.yaml应用程序.yaml

runtime: nodejs14
env: standard
service: beta

A thought I had is that the static resources are coming from the default service, but then why would the classic routing be working but the beta isn't?我有一个想法是 static 资源来自默认服务,但为什么经典路由可以工作而 beta 不行?

Is there some other (ie, better) way to deploy a beta for testing (without using services or replacing the app that's currently up?) in GAE?在 GAE 中是否有其他(即更好的)方法来部署用于测试的测试版(不使用服务或替换当前运行的应用程序?)?

Appreciate any thoughts or answers in advance!提前感谢任何想法或答案!

  1. Did you remember to actually deploy the new service ie your deploy command now has to be您是否记得实际部署新服务,即您的部署命令现在必须是
   gcloud app deploy app.yaml <path to beta.yaml> <path to classic.yaml>
  1. Did you set the name of the new service in its app.yaml file?您是否在其 app.yaml 文件中设置了新服务的名称?

  2. If you don't want to use services , you can use a different version .如果不想使用services ,可以使用不同的version For example, you can deploy this 'beta' service as a 'beta' version of your default service.例如,您可以将此“测试版”服务部署为默认服务的“测试版”版本。 To do that, your deploy command will now be为此,您的部署命令现在将是

gcloud app deploy app.yaml --version = beta 

Note that since this is a different version of your default service, the name is still app.yaml请注意,由于这是default服务的不同版本,因此名称仍为app.yaml

Your app will now be available via beta.<project_id>.appspot.com您的应用程序现在可以通过beta.<project_id>.appspot.com获得

  1. Also, I think (haven't tested this myself) that even without a dispatch.yaml file, if a user browses to a subdomain that matches the name of your service or version (and you have mapped the custom domain), GAE will automatically serve that.另外,我认为(我自己还没有测试过)即使没有 dispatch.yaml 文件,如果用户浏览到与您的服务或版本名称匹配的子域(并且您已经映射了自定义域),GAE 会自动服务那个。 See this documentation which says看到这个文档

If the user browses a domain that matches an application version name or service name, the application serves that version.如果用户浏览的域与应用程序版本名称或服务名称相匹配,则该应用程序会提供该版本。

  1. Finally, for me, I always put the least restrictive route last (helps prevent errors for me but don't know if it's an issue in your case).最后,对我来说,我总是把限制最少的路线放在最后(有助于防止我出错,但不知道这是否是你的问题)。 This means that my dispatch.yaml file would have - url: "audiologysimulator.com/*" as the last entry这意味着我的 dispatch.yaml 文件将有- url: "audiologysimulator.com/*"作为最后一个条目

暂无
暂无

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

相关问题 Azure 在没有 http:// 前缀的浏览器中输入特定 URL 时,应用程序网关通配符侦听器无法解析以更正 URL - Azure Application Gateway Wildcard listener not resolving to correct URL when specific URL entered in browser without http:// prefix php72 动态 url 前端路由 controller 通过入口点标准不工作 Google App Engine [GAE] - php72 dynamic url routing with front controller via entry point standard not working Google App Engine [GAE] Firebase:云 function 已正确部署但未被触发 - Firebase: Cloud function deployed correctly but not being triggered GKE 入口未根据 url 中的主机进行路由 - GKE ingress not routing based on host in the url Angular 部署在 S3 上的 2+ 应用程序出现路由问题 - Angular 2+ application deployed on S3 gives routing issue 如何使用 Kops 在 AWS 中公开部署在 kube.netes 上的 GRPCS 服务 - How to expose GRPCS service deployed on kubernetes in AWS using Kops 如何将新节点类型添加到已部署的 Service Fabric 集群? - How to add new Node Type to deployed Service Fabric cluster? 部署在Azure应用服务上的网站fileManager丢失大量文件 - Large number of files missing in fileManager of a website deployed on Azure App Service 根据 Azure 服务总线中的消息计数自动缩放 AKS 部署的节点 - Autoscale AKS deployed nodes based on the count of messages in the Azure service bus gcloud run service replace 删除以前的修订前缀 - gcloud run service replace removes previous revision(s) prefix(s)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM