1

I'm currently migrating an app from Heroku to Google Cloud Platform (with Kubernetes Engine and Cloud SQL). In using Heroku, I've become used to the incredibly simple practice of defining a DATABASE_URL and letting their Heroku Postgres DBaaS do all of the work of connecting my app logic to the database:

DATABASE_URL=postgres://username:password@host:port/database

With Python, I could use dj-database-url and it couldn't be easier.

Now, I'm working on connecting each of my Docker containers to my Cloud SQL instance through the Cloud SQL Proxy, and it's a pain.

My question is: Why did Google go with this approach rather than a DBaaS approach? Are there any advantages? Or is it just that building a DBaaS like Heroku Postgres would take a lot of resources?


Bonus question: What are the advantages of using secrets over environment variables?

  • 1
    There is actually a lot of discussion about what the Google Cloud Proxy provides / why you’d use it in the link you included in the question. – Paul May 8 '18 at 10:40
  • Ah cool, I'll read it more closely then – Michael Hays May 8 '18 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.