开发者

Managing two instances of the same GAE application

I have an GAE app, and I deploy it on 2 different domain开发者_C百科s, and they use separate datastores.

However, right now it is done by having two identical folders with different app.yaml configurations.

If I make changes I need to copy all files again. Is there an elegant solution for that, like having two app.yaml files in the same folder?


Use a single application, with namespaces to separate data between domains.


Appcfg.py has a --application command line option that is supposed to override the value in your app.yaml. Using that you could deploy the same directory to two different apps.


Assuming you are avoiding Nick's suggestion for some particular reason, the next best thing would be to include the copying process in your build system. 1 When you build your deploy target, maven/make/ant/"your favorite build tool" should check out copies of your latest revision from your source control system into separate directories, then copy in or rename the appropriate yaml files. 2

  1. You do have an automated build process, right? If not that should be very high on your list if you are striving for elegance.
  2. You are using source control, right? I refuse to entertain the notion that you aren't, because that would be downright ridiculous.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜