Serverless Deployment of a Django Project with Google Cloud Run

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • Deploy your Django container to Google Cloud from the command line using gcloud.
    A fast and easy way to deploy your Django project that uses S3 buckets and a PostgreSQL database.
    You will create a Docker image of your project, push it to the Container Registry and launch it with Cloud Run.
    Resources:
    codelabs.devel...
    cloud.google.c...

КОМЕНТАРІ • 28

  • @monata.
    @monata. 3 роки тому +4

    Thank you for the video, I didn't know there was a way to use django on a serverless architecture.

    • @djangoroad
      @djangoroad  3 роки тому +2

      There is also AWS Lambda which is quite popular.

  • @pl-rc
    @pl-rc 3 роки тому +1

    Very useful and quick way to try these all out. Thanks for the video!

  • @hueguy
    @hueguy 3 роки тому +1

    Cool demo thank you! Could you also please make a video about CD/CI using Cloud Run?

  • @officialp283
    @officialp283 2 роки тому

    This is exactly what I am looking for. Thank you

  • @mrmuranga
    @mrmuranga 3 роки тому

    Thanks for this...Please make one where you don't have to bake the credentials, probably letting cloud run pick them from google secret manager

  • @antonschumann3889
    @antonschumann3889 3 роки тому

    Thanks a lot for this and some other videos of you. They really helped me a lot.

    • @djangoroad
      @djangoroad  3 роки тому

      I'm so glad you found them helpful!

  • @JayPatel-oo7yr
    @JayPatel-oo7yr 3 роки тому

    awesome video! all the written tutorials were very confusing

  • @rangabharath4253
    @rangabharath4253 2 роки тому

    Hi. Awesome video. Can you please make a video on deploying a drf django rest framework app to cloud run. I am facing cors error when trying to access api from react app. I installed cors headers also and tried in all ways. But no luck. Can you please help. Thanks

  • @erickfis2008
    @erickfis2008 3 роки тому

    pls make one video for ci/cd using cloud build and cloud run. I'm really strugling with the environment variables.

  • @michaelnajera7958
    @michaelnajera7958 3 роки тому

    Great Video. Just wanted to ask that at timecode 4:35 you inject secrets into the image and of course that image will run on Cloud Run. But should we be using environment variables for secrets in Cloud Run?
    The reason why I ask is because if I set an ENV VAR in cloud run via the console, there is a warning not to use ENV VAR's for secrets and to use Secret Manager instead. This is of course an ENV VAR on the host machine, which we don't own in a serverless. But is the same true for secret ENV VAR's in the embedded docker image?

    • @djangoroad
      @djangoroad  3 роки тому +1

      To make this process more secure, I would change the settings.py code to access the Google Secret Manager on the backend and get sensitive data into the app. This way you don't need to have any secrets in the Docker image and you would set a service account to have access to the secrets on the Secret Manager.

  • @tjmooooooon
    @tjmooooooon 3 роки тому

    does serving static from s3 and using cloud run for backend guarantees the scalability of the app?
    I'm guessing the cloud run does all the load balancing for you instead of using nginx and having multiple container in the back

    • @djangoroad
      @djangoroad  3 роки тому

      Both are scalable afaik and you pay for what you use.

    • @tjmooooooon
      @tjmooooooon 3 роки тому

      @@djangoroad cool. I really like you channel btw keep it up!

    • @djangoroad
      @djangoroad  3 роки тому

      Cheers, thanks for watching.

  • @savyasachi2234
    @savyasachi2234 3 роки тому

    mam at 4:35, How are you injecting the values into the variables because I am not understanding what is the value of those $VARIABLE_NAME.
    Please tell me What they signify

  • @MiguelElAngelNoriega
    @MiguelElAngelNoriega 3 роки тому

    I use app engine, and cloud SQL but it's very expensive. With this method How much is it? Well in general, I know depend of project.

    • @djangoroad
      @djangoroad  3 роки тому

      If your Django app uses a database (DB) and you are deploying with Cloud Run, then you still need to provision a DB somehow.
      For my videos, I usually have a DB setup somewhere on a Digital Ocean droplet with low storage etc because I'm just using it as a demo (I delete it later on).
      DB solutions from cloud platforms such as Google still offer you things that you would have to do on your own if you were to setup your own DB instance, for example (backup, scaling, security, etc).

  • @yanikkoval9948
    @yanikkoval9948 3 роки тому

    any particular reason for using S3 over Google Storage?

    • @djangoroad
      @djangoroad  3 роки тому

      No particular reason for this video.

  • @JoseLaruta
    @JoseLaruta 3 роки тому

    how are you hosting your DB? by the way, great video!

    • @djangoroad
      @djangoroad  3 роки тому

      I used an instance outside of GCP but using CloudSQL should be easy to do.