Django Site On Google Cloud Platform

Hey folks,

Django noob here. I managed to create a simple site to use in my current job for some engineering calculations and it works fine locally. The next step I took was to host it using Heroku, which was also a great learning experience. Unfrotunately, my work IT has blocked heroku. The interesting thing is that the main page loads up fine, but the moment I fill out a form and hit the "Send" button it gets blocked.

I think getting IT to unblock Heroku will be a monumental task, so I was wondering about using Google Cloud Platform. I guess my question is - how easy is it to host a Django site on GCP and for a small site like mine? (total size is roughly 60mb with extremely minimal use). I figured this would be a good learning experience for getting familiar with GCP as well.

2 thoughts on “Django Site On Google Cloud Platform”

  1. I’m also new to this and found it super easy to get set up on app engine on GCP (https://cloud.google.com/python/django/appengine). You can run quite a bit on there with the free tier (https://cloud.google.com/free/). I’m using cloud postgresql (with cloudsql proxy), cloud build (automated tests hooked into github), and hosting code in github (cloud source would work but I wanted the project/kanban part of github).

    I also highly recommend to use django cookiecutter to create your app (https://github.com/pydanny/cookiecutter-django) once you’ve gotten the hang of basic Django.

    Tell me if you have any questions!

    Reply
  2. If you can containerize your app it would make it incredibly easy. Essentially divide your individual components into separate docker images and then deploy using kubernetes. GCP can take kubectl commands. Would make it very lightweight and much cheaper. Plus since containers spin up a bit faster then a whole vm with all the extra stuff. You can make it fairly ephemeral in nature and only pay when it’s used.

    https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app

    Reply

Leave a Comment