Run Google App Engine application with microservice

眉间皱痕 提交于 2019-11-30 15:43:11
Dan Cornilescu

A monolithic app is really an app with a single module/service (the default one). The app.yaml config for such app (like the one you shown) is really the default module's config file - there is no "per-app" such config. The modules are "tied" together into one specific app by this line in their respective <module>.yaml:

application: <app_identifier>

In a multi-module app each module has its own <module>.yaml config file (the name doesn't have to be app.yaml, it actually has to be different if the module code share the same dir - but I'd stick with the recommended directory structure - one module per app subdirectory).

See this Q&A (which also contains some examples): Can a default service/module in a Google App Engine app be a sibling of a non-default one in terms of folder structure?

The default module name can/should not be set. All other module names are configured in the respective <module>.yaml files, like this:

module: <module_name>

All modules in the same app share the same datastore (thus the same index.html file).

Note that other config files are also app-level configs, thus really shared by all modules (or just the default module, which is the one executing the cron service, for example), I'd place them as recommended in the app's top level dir: cron.yaml, dispatch.yaml, queue.yaml.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!