How can I update one (or a couple) files in a Google App Engine Flask App?

If I'm just updating, say, my main.py file, is there a better way to update the app then running gcloud app deploy, which takes several minutes? I wouldn't think I need to completely blow up and rebuild the environment if I'm just updating one file.

Upvotes: 0

Views: 64

Answers (1)

BrettJ
BrettJ

Reputation: 6851

You must redeploy the service. App Engine isn't like a standard hosting site where you FTP single files, rather you upload a service that becomes containerized that can scale out to run on many instances. For a small site, this might feel weird, but consider a site serving huge amounts of traffic that might have hundreds of instances of code running that is automatically load balanced. How would you replace that single file in that situation across all your instances? So you upload a new version of a service and then you can migrate traffic to the new version either immediately or ramped up.

What you might consider an annoyance is part of the tradeoff that makes App Engine hugely powerful in not having to worry about how your app scales or is networked.

Upvotes: 1

Related Questions