Skip to content

Latest commit

 

History

History
67 lines (38 loc) · 2.15 KB

File metadata and controls

67 lines (38 loc) · 2.15 KB

Deploy a Django and Firebase Hosting Retail Website

Introduction

You’re going to build a sample application with multiple Cloud Run services:

  • A Django API server, using Django REST Framework on Cloud Run
    • based by a Cloud SQL Postgres database
  • A NodeJS client front end, using the Lit framework, on Firebase Hosting

You'll use a script to deploy the required infrastucture, which itself will use Terraform and Cloud Build.

This walkthrough requires a number of dependencies, including firebase, gcloud, and terraform. All of which are available in the Google Cloud Shell environment.

Project Setup

Before you begin, you will need a Google Cloud project.

  1. Confirm the Cloud Shell is configured with your selected project:

    gcloud config set project <walkthrough-project-id/>

Automated deployment

You'll now use a script to deploy the sample application.

To use the script, you will need to set a number of values for the gcloud and firebase tools to reference.

  1. Configure the Project and Region variables.

    export PROJECT_ID=<walkthrough-project-id/>
    export REGION=us-central1
  2. Deploy the application using the setup script:

    bash setup.sh

View application

Your application is now available at https://.web.app.

See what you can now do with this application by reading the docs.

Conclusion

You're done!

Here's what to do next: