Deploy Django Website to Google Cloud

Deploy Django Website to Google Cloud

In this video we deploy a Django website to Google Cloud using the app engine standard environment.

(The website is not available anymore due to high costs!)
View the website and answer the poll:
Follow along with the documentation:

My Gear:
HyperDrive USB C Hub:
Apple MacBook Pro (15-Inch, 16GB RAM, 2.6GHz Intel Core i7):
Logitech M510 Wireless Computer Mouse:
Samsung CF390 Series 27 inch FHD 1920×1080 Curved Desktop Monitor:
Google Pixel 4 XL:
Wireless Keyboard:
Google Pixel Buds:

CONTACT: [email protected]

Connect with me:

32 thoughts on “Deploy Django Website to Google Cloud

  1. I followed same steps but with postgresql, my app ran perfect on local device but after deployment it shows 500 server error.

  2. Hi Ben you made it so easy. Any chance make a video in updating to a new version and deleting the old instance? I couldn't get my head around this. Cheers.

  3. Thank you for the video, I was having trouble understating what steps I should take.
    But one question after deployment how do I modify my domain name?

  4. Does Google suggest if you need to scale up? I'd like to host a dynamic website which requires some data processing

  5. I can not create an instance. When I click on the "GO to cloud Sql instance page". They ask me to create a billing for project not CLoud SQL instance. What should I do?

  6. I'm keep getting django.db.utils.OperationalError: 1045 even I'm using correct password. How can I fix this. thanks

  7. Thanks Ben. Very helpful. Any idea how much google would charge for a basic app like this? (after the free credits run out)

  8. WOW! Awesome Tutorial 🙂

    I have also uploaded a tutorial of "How to Host Python Flask Web App on Google Cloud Platform App Engine Flexible | Google Vision API":

  9. Updating service [default] (this may take several minutes)…failed.
    ERROR: ( Error Response: [9]
    Application startup error! Code: APP_CONTAINER_CRASHED
    /bin/sh: 1: exec: gunicorn: not found
    I used my own project. I am getting this error. Please help. Thank You

  10. Thanks for the video. Helped a lot, and I am able to use the database with my localhost, but I can't access my app – it gives 502 BAD_REQUEST error. Can you help me figure this out? ( I am using Windows )

  11. Thanks mate…I was able to follow through till the end without any errors on windows. Thanks again.
    Question: I thought the database used was MySQL, but the interface still looks like SqlLite, is that normal?

  12. using windows, got an error while connecting postgres server. error:- listen tcp bind: An attempt was made to access a socket in a way forbidden by its access permissions. Kindly help me out

  13. Hey ben, this worked for the django project that google had but it can't find the templates when I deployed my own django project.

  14. Hi Ben! thanks for this video.
    I'm having a troubleshoot:
    after I made the diploy and trying to acces to the server, why appears : 502 Bad Gateway

    I go to the app engine settings and it shows :
    gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>


    reap_workers (/env/lib/python3.7/site-packages/gunicorn/


    handle_chld (/env/lib/python3.7/site-packages/gunicorn/


    close (/env/lib/python3.7/site-packages/gunicorn/


    close_sockets (/env/lib/python3.7/site-packages/gunicorn/


    stop (/env/lib/python3.7/site-packages/gunicorn/


    halt (/env/lib/python3.7/site-packages/gunicorn/


    run (/env/lib/python3.7/site-packages/gunicorn/


    run (/env/lib/python3.7/site-packages/gunicorn/app/


    run (/env/lib/python3.7/site-packages/gunicorn/app/


    run (/env/lib/python3.7/site-packages/gunicorn/app/


    <module> (/env/bin/gunicorn:10)

    If you could help me I'll be very greatful

    Excuse my bad english

  15. Hi Ben, Thank you. It helps a lot. I am getting an error at the time of deploying. ERROR: ( PERMISSION_DENIED: The caller does not have permission. I am using Windows. Thank you.

  16. Hay, Ben. I'm using windows and I am stuck around 11:20 there is no CMD tabs only new windows any ideas how to get around this? I did 2 cmds and repeated the steps on both but, its giving me a 'cloud_sql_proxy.exe' is not recognized as an internal or external command.

  17. I'm not sure, but I think you should mention that for your own project, you should create 'requirements.txt'. In example project it is already in the repository, but when you want to deploy you own project, you need to used 'pip3 freeze > requirements.txt.' This command should be run in virtual environment, to avoid installing unnecessary packages.

  18. Hi Ben, thank you for your great video. It helps a lot.
    When you set up your database in, why do you use your Google Cloud username/password inside the ELSE bracket? As far as I know, if there is no connection to the cloud (check in the IF bracket), django will direct to the local database (specified in the ELSE bracket). Therefore, should ELSE be populated with the information of the local database?

Leave a Reply

Your email address will not be published. Required fields are marked *