I have two subdomains registered in my App Engine application:
- service-a.my-app.com
- service-b.my-app.com
I have added all the records (CNAME, A) on the server.
I have three services in my GAE:
- default
- service-a
- service-b
And I want each subdomain to point to the correct service. However, each time I access them, only the default service is used.
Side note: the GAE is running a flexible environment for laravel 5.4 and my dispatch.yaml (located in default service is as follows:
dispatch:
-url: "service-a.my-app.com/*"
service: service-a
-url: "service-b.my-app.com/*"
service: service-b
Please note that
dispatch.yaml
is an app-level configuration, not a service-level one and occasionally updating the service containing it doesn't automatically update the app-level configs.You should use the specific deployment commands for
dispatch.yaml
, executed from the directory containing the file:gcloud app deploy dispatch.yaml
if you're using the Cloud SDKappcfg.py update_dispatch .
if you're still using the GAE SDKSee also dispatch.yaml not getting updated.
The same is true for other app-level
.yaml
config files as well, which is probably one reason for each having its own update/deploy command (and also to allow deploying them independently of any particular app service. Somehow related: Why do I need to deploy a "default" app before I can deploy multiple services in GCP?