Vladimir Keleshev
Vladimir Keleshev

Reputation: 14245

Managing two instances of the same GAE application

I have an GAE app, and I deploy it on 2 different domains, 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?

Upvotes: 2

Views: 82

Answers (3)

Peter Recore
Peter Recore

Reputation: 14187

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.

Upvotes: 1

Calvin
Calvin

Reputation: 4195

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.

Upvotes: 3

Nick Johnson
Nick Johnson

Reputation: 101139

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

Upvotes: 5

Related Questions