Back to Blog

Lessons From Deploying to App Engine

Deploying a Django app to Google App Engine sounds straightforward — and for the most part, it is. But there are a handful of lessons I wish someone had told me before I started. Here's what I learned the hard way.

Lesson 1: Static files need special handling

App Engine serves static files separately from your application. You need to configure app.yaml with explicit static file handlers, and make sure collectstatic runs as part of your deployment process. Don't assume Django's built-in static serving will work in production.

Lesson 2: Environment variables aren't straightforward

App Engine doesn't natively support .env files. I ended up using Google Cloud Secret Manager for sensitive values and app.yaml environment variables for non-sensitive config. It takes some setup, but it's the right way to do it.

Lesson 3: Cold starts are real

If your app doesn't get consistent traffic, App Engine will scale it down to zero instances. The first request after that triggers a cold start, which can take several seconds. For a personal site, this is mostly fine — but it's good to be aware of.

My Deployment Checklist

  1. Run python manage.py collectstatic
  2. Verify app.yaml has correct runtime and handlers
  3. Check that all secrets are up to date in Secret Manager
  4. Deploy with gcloud app deploy
  5. Test the live site immediately after deploy
Deploying is not the finish line — it's the starting line. The real work begins when your code meets the real world.

Was It Worth It?

Absolutely. App Engine gives you managed infrastructure, automatic scaling, and a generous free tier. For a personal project, it's hard to beat. The learning curve is real, but the payoff is a deployment workflow that just works once you've set it up properly.