Google Cloud run, Django and sqlite

Viewed 1501

I'm developing small single user applications in Django. Currently I do so with Heroku, which works just fine. I would like to deploy the application on Google Cloud run to have in the future a bit more flexibility.

In order to keep the overhead as small as possible I was considering using Sqlite. To keep persistency all I would need is a persistent volume, which could be achived via Google Cloud storage that is mounted into the docker container via gcsfuse. But here is the issue. I can't find a small Image with python and gcsfuse. I'm not a docker pro. Just getting started...

Any help is appreciated.

1 Answers

Google itself provides a HowTo Deploy a (simple) Django app to Google Cloud Run:

https://codelabs.developers.google.com/codelabs/cloud-run-django/

I myself as a Google Cloud rookie followed it step by step and it worked without any problems. By the way, I found that via the episode of the podcast Django Chat "Advanced Deployment" with Katie McLaughlin.

The HowTo use a Cloud SQL instance instead of Sqlite, but this seems to be a good choice:

„Generally speaking SQLite is not a good database choice for professional websites. So while it is fine to use SQLite locally while prototyping an idea, it is rare to actually use SQLite as the database on a production project.“

William S. Vincent. „Django for Professionals, Chapter 2

Letting this apart it shouldn't be so hard to skip the Cloud SQL step and keep SQLite.

Related