Deploy Django into Production with Kubernetes, Docker, & Github Actions. Complete Tutorial Series

Поделиться
HTML-код
  • Опубликовано: 28 июн 2024
  • Learn how to deploy a production-ready Django application into a Kubernetes cluster.
    We partnered with DigitalOcean to bring you this series. Sign up now for a $100 credit: do.co/cfe-youtube
    Kubernetes is a tool to manage containers. This type of management is called orchestration because it does more than just manage the containers such as it will scale up and scale down resources as needed (among many other things).
    Since Kubernetes is a massive tool, we're going to be covering a practical implementation using a Docker-based Django application.
    Django is a way to build web applications rapidly using Python. There are many ways to get Django into production so the question is why use K8S at all? There's many reasons we'll cover throughout this series but here are a few:
    ● Gracefully deploy Docker-based Django projects
    ● Scale up (or scale down) your web apps with ease
    ● Use a few or a lot of microservices internally or externally
    ● Self-heal when services go down
    ● Simplify app deployment (after initial configuration)
    ● Streamline your backend Infrastructure (provision virtual machines and let k8s do the rest)
    Kubernetes can do a lot which makes it a great tool to learn but also a daunting one at that. To make it more approachable here's what we'll be doing:
    ● Start a Python Virtual Environment
    ● Create a bare bones production-ready Django project
    ● Create a Dockerfile to describe our environment (much like this blog post: www.cfe.sh/blog/django-on-docker)
    ● Use a managed Database service from DitgitalOcean
    ● Install Kubernetes Command Line tool locally (kubectl)
    ● Start a Kubernetes Cluster on DigitalOcean
    ● Provision a Deployment and Service for our Django project
    ● Implement Github Action Workflows to automate future deployments
    ▶︎ References
    ● Django on Docker guide: cfe.sh/blog/django-on-docker
    ● Docker & Docker Compose tutorial series: cfe.sh/projects/docker-and-do...
    ● Github Actions guide: cfe.sh/blog/django-github-act...
    ● DigitalOcean $100 credit for new accounts: do.co/cfe-youtube
    ● Project Code: github.com/codingforentrepren...
    ★ Subscribe: cfe.sh/youtube ★
    ⦿ New to Django? Checkout the Try Django Tutorial Series: • Try Django 3.2 - Pytho...
    ▶︎ Chapters
    00:00:00 Welcome to Django & Kubernetes
    00:02:08 Requirements & Recommendations
    00:07:12 Install Kubernetes Command Line Tool Kubectl on macOS
    00:12:49 Install Kubernetes Command Line Tool Kubectl on Windows
    00:19:08 Create the Python Virtual Environment
    00:24:28 Install Requirements & Start Django Project
    00:33:01 Environment Variables with a dotenv file
    00:36:10 Setup django dotenv to read our dotenv file
    00:41:54 Update Django settings for Database & Environment Variables
    00:47:29 Docker, Dockerfile & dockerignore
    01:01:13 Create a migration script
    01:09:46 Docker Compose Part 1
    01:32:48 Docker Compose Part 2
    01:41:43 Provision Kubernetes on DigitalOcean
    01:55:20 Connect to Kubernetes with kubectl & kubeconfig
    02:03:41 Deploy your First Container on Kubernetes
    02:14:00 Expose your Deployment with a Load Balancer
    02:26:11 Deploy a Minimal FastAPI App
    02:34:24 DigitalOcean Container Registry
    02:38:36 Build & Push Docker Container to DO Container Registry
    02:45:08 Managed PostgreSQL Database
    02:52:44 Kubernetes Secrets from env
    02:57:17 Django Deployment & Service
    03:11:21 Full Deployment & Fix Errors
    03:24:55 Deployment Guide
    03:38:57 Github Actions Test Django Automatically
    03:55:31 Github Actions Build & Push Docker Container to DigitalOcean
    04:11:09 Github Actions Django Deployment on Kubernetes
    04:29:01 Django Static Files on DigitalOcean Spaces
    04:54:28 New Django App, Models, & Tests
    05:10:55 Thank you

Комментарии • 149

  • @CodingEntrepreneurs
    @CodingEntrepreneurs  2 года назад +16

    Thank you for checking this one out! Code linked below as well as chapters -- skip around!
    Code: github.com/codingforentrepreneurs/Django-Kubernetes
    00:00:00 Welcome to Django & Kubernetes
    00:02:08 Requirements & Recommendations
    00:07:12 Install Kubernetes Command Line Tool Kubectl on macOS
    00:12:49 Install Kubernetes Command Line Tool Kubectl on Windows
    00:19:08 Create the Python Virtual Environment
    00:24:28 Install Requirements & Start Django Project
    00:33:01 Environment Variables with a dotenv file
    00:36:10 Setup django dotenv to read our dotenv file
    00:41:54 Update Django settings for Database & Environment Variables
    00:47:29 Docker, Dockerfile & dockerignore
    01:01:13 Create a migration script
    01:09:46 Docker Compose Part 1
    01:32:48 Docker Compose Part 2
    01:41:43 Provision Kubernetes on DigitalOcean
    01:55:20 Connect to Kubernetes with kubectl & kubeconfig
    02:03:41 Deploy your First Container on Kubernetes
    02:14:00 Expose your Deployment with a Load Balancer
    02:26:11 Deploy a Minimal FastAPI App
    02:34:24 DigitalOcean Container Registry
    02:38:36 Build & Push Docker Container to DO Container Registry
    02:45:08 Managed PostgreSQL Database
    02:52:44 Kubernetes Secrets from env
    02:57:17 Django Deployment & Service
    03:11:21 Full Deployment & Fix Errors
    03:24:55 Deployment Guide
    03:38:57 Github Actions Test Django Automatically
    03:55:31 Github Actions Build & Push Docker Container to DigitalOcean
    04:11:09 Github Actions Django Deployment on Kubernetes
    04:29:01 Django Static Files on DigitalOcean Spaces
    04:54:28 New Django App, Models, & Tests
    05:10:55 Thank you

  • @ai.201
    @ai.201 2 года назад +63

    I don't know many how can you post such high quality content for free. Salute.

    • @ytg6663
      @ytg6663 Год назад +2

      Because.... mostly but Not everyone is greedy

    • @sethurk
      @sethurk Год назад

      May be digitalocean sponsored? But still great content

    • @prosperlekia9029
      @prosperlekia9029 Год назад

      ​@@sethurk okay

  • @danielkamau8436
    @danielkamau8436 2 года назад +2

    WAAOO!!! You just did it.... Was missing this K8s thing. and finally sir you did it. Thanks a lot.

  • @joshqcophie
    @joshqcophie 2 года назад +2

    I am stoked!!! Started looking into kubernetes recently... Glad to be subscribed to your channel. You just saved me loads of hustle

  • @justinnoor4915
    @justinnoor4915 2 года назад +1

    Great to see you still in the game killing it

  • @benyaminaghaebrahimi5073
    @benyaminaghaebrahimi5073 2 года назад +3

    I'm a subscriber since 2019, It's unbelievable how informatic your channel is! Great Content Great Mastery. You have no idea how many times your channel just saved my a**! Especially this one! I mean someone with a good portion of time can individually start a startup just by watching your videos!

  • @hemalpatel3770
    @hemalpatel3770 Год назад

    just randomly clicked from suggestion! but Man I Love you!!! Never found this much detailed and insane explanation. Subbed

  • @yahyamlaouhi9508
    @yahyamlaouhi9508 9 месяцев назад +1

    I am truly impressed. I've been working as a software engineer for two years, and this tutorial is unbelievable!

  • @tarekahmed8159
    @tarekahmed8159 2 года назад +1

    Once I get a job i will purchase subscription for sure. This is brutal free content. Life saver.

  • @Brocollipy
    @Brocollipy 2 года назад +1

    Wow thanks for doing this. Really helpful.

  • @skynet-software
    @skynet-software Год назад

    The best tutorial I've seen so far :)

  • @dannypark9793
    @dannypark9793 Год назад +2

    The video was so helpful. Thank you very much.

  • @eagleofsharm
    @eagleofsharm 2 года назад +1

    QUALITY, this is what everyone got used to from Justin Michel. THANK YOU

  • @animeshsingh4290
    @animeshsingh4290 2 года назад +4

    Would've been a lifesafer 2 weeks back when I was ramming my head deploying an application at work, anyway thanks and keep up the good work!

  • @xzatech
    @xzatech Год назад +4

    I finally found the time to go over this material, and OMG, my mind is blown away by what you are showing us. Justin, there are no words but the utmost Gratitude towards you and your teachings. I'm blown away by this material again I'm only two and a half hours in, and my mind just Exploded like confetti. I will admit the Kluster will be more expensive than Dokku, I think - but I'm anxious about seeing this lesson to the end

    • @felipe118ful
      @felipe118ful Год назад +2

      I felt that excited when I was coding this project just as you my friend, this classes are like treasure for us

  • @sandykurnia7150
    @sandykurnia7150 2 года назад

    always be number one Amazing tutorial

  • @braveman1641
    @braveman1641 2 года назад +2

    You're a star mate.

  • @user-ed9fl4ys3m
    @user-ed9fl4ys3m 8 месяцев назад +1

    Hey!
    I know you from 2019 with Django full course for Beginners - that was a point where i've started lear python and Django.
    So now because of you i know Django ) Thank you very much for your work, dude!!!!!

  • @a-raheemjamaal5564
    @a-raheemjamaal5564 2 года назад +1

    Salute Justin!
    Awesome work💯

  • @pepitoos
    @pepitoos 2 года назад +1

    This video is AWESOME. Thank you very much!!!!!!

  • @sumitsrivastava1021
    @sumitsrivastava1021 Год назад

    Awesome 🎉🎉🎉🎉🎉… after a very long time saw some end to end implementation with complete application development lifecycle with Devops implementation

  • @wenliangzhang2986
    @wenliangzhang2986 2 года назад +3

    Thank you, Justin! Your Django tutorial is always the best! If I can give you more than one thumbs up, I will do it without hesitation!

  • @johnnwabuforudemezue1108
    @johnnwabuforudemezue1108 2 года назад

    I don't know why your RUclips is growing slowly, you are the best

  • @tushargupta3236
    @tushargupta3236 Год назад

    Learned a ton!!!

  • @violasangut6271
    @violasangut6271 Год назад +1

    im in the middle of this now and i just want to say this is some dope work....i hope one day ill be able to master my skills like you sir!! kudos!

  • @naveedqadir0
    @naveedqadir0 Месяц назад

    Really High Quality Content for free🎉❤️

  • @warshipwarriors
    @warshipwarriors Год назад

    Great help. Thanks man

  • @olegkleshchunov4771
    @olegkleshchunov4771 2 года назад +2

    Thanks! Amazing content. High quality

  • @421048
    @421048 Год назад +1

    Thank you! Is helping me a lot in my work.

  • @haroonrehman8156
    @haroonrehman8156 5 месяцев назад

    you should add another series where you explain in very short time for experienced programmers.

  • @LordFullStack
    @LordFullStack 2 года назад +1

    Awesome !!

  • @sinner_ssaint
    @sinner_ssaint 2 года назад +1

    Salute thank you so much this helped me a lot !

  • @rohitschauhanitbhu
    @rohitschauhanitbhu 2 года назад +2

    This is the absolute best tutorial for a beginner like myself on how to deploy a django website onto cloud. Thank you so much. My only humble request is if you can make a video or point me in the direction of how to deploy on AWS instead of DigitalOcean?

  • @MaximRovinsky
    @MaximRovinsky 2 года назад

    The Complete Tutorial as much as possible. Great work👍🏻

  • @arunpadikkalathu764
    @arunpadikkalathu764 2 года назад

    Good work👍🏻👍🏻

  • @Brocollipy
    @Brocollipy Год назад +1

    What an amazing video. Really can't thank you enough. I've struggled to find info about using docker for django in production. A couple of notes in case it's helpful to anyone else. I've faced a few issues along the way caused by using an M1 Mac.
    ---- Postgres Error : scram authentication requires libpq version 10 or above -
    This error us cause by a bug that causes an older version to get built when docker makes containers for M1 macs. To resolve you can ask docker build the container for amd64 by typing "export DOCKER_DEFAULT_PLATFORM=linux/amd64 " (this will slow things down a lot tho).
    --- General failure of the image. Running my image in digital ocean apps failed (as did my kubernetes pods). I found a stockoverflow stating that when images are build on M1s it can cause issues. To solve change the first line of the Dockerfile to: FROM --platform=linux/amd64 python:3.10-slim to tell docker to build the image for amd not your local arm.

  • @buituandung4554
    @buituandung4554 Год назад

    from VIETNAMESE , you are wonderful

  • @I_think_its_funny
    @I_think_its_funny 5 месяцев назад

    I just came here to see who are these people with the super power of watching a 5hour tutorial.. I'm wowed

  • @vivektiwari5474
    @vivektiwari5474 2 года назад +1

    I request you (CodingEntrepreneurs)to please make PLAYLIST related videos thatswhy everyone can learn in well way. Thanks

  • @fidelfrost
    @fidelfrost 2 года назад +1

    Just a few minutes in and I’m loving this already. Can’t believe this is free!

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +1

      Thank you. Be sure to show DigitalOcean some love too (they sponsored this) do.co/cfe-sh/ 🦾

  • @loc5706
    @loc5706 Год назад

    Digital gold!

  • @navanjanevidunuwan1244
    @navanjanevidunuwan1244 2 года назад

    You're doing an amazing job. All these quality contents are for free? Incredible

  • @oshodikolapo2159
    @oshodikolapo2159 2 года назад +1

    Thanks for this

  • @kspv2806
    @kspv2806 8 месяцев назад

    Thanks a lot😊

  • @MohdImran-uq5iv
    @MohdImran-uq5iv 2 года назад +1

    Thanks 🙏🏻

  • @symphognoboa8224
    @symphognoboa8224 2 года назад

    Thanks.... Great job...

  • @mahmudulhassan9043
    @mahmudulhassan9043 2 года назад +1

    Ohh thank you very much....

  • @mikenester4416
    @mikenester4416 Год назад

    Thanks!

  • @uwasanmaku5004
    @uwasanmaku5004 2 года назад +1

    Thank you

  • @elyasomar3405
    @elyasomar3405 2 года назад

    Great video and thanks mate . I did a research and found out that you don't need virtualenv if you're using docker because there won't be another app in same container

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +1

      But! Containers may have conflicts when it comes to Python packages - even if it’s unlikely I still think virtual environments are a must when deploying to production!

  • @Mostaqmahmud
    @Mostaqmahmud 2 года назад +1

    Loveee youuuuuuuuuuuuuu mannnnnnnnnnnnn

  • @kicknotes
    @kicknotes 9 месяцев назад

    2:37:57 "on Windows..." Reason enough to install WSL2. Even if you prefer Windows, there are just some cases where having access to a *nix environment for tooling is very helpful.

  • @gunnarsvanberg4773
    @gunnarsvanberg4773 6 месяцев назад

    Great vid. Not sure if I would bother setting up a venv in a container though. Didnt make any sense to me. But I would definitely pip freeze my dev. Venv when deploying into production. After unit testing is done.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  6 месяцев назад

      Os-Python has different packages then a clean venv. So yeah, always use a virtual env

  • @ClassyGameRacer
    @ClassyGameRacer Год назад +2

    This is a fantastic k8 deployment example. I got a question @3:36:38, Don't we need to migrate database changes on each of the pod?

    • @hemalpatel3770
      @hemalpatel3770 7 месяцев назад

      i dont think so. we're using digital ocean managed db. so at pod creation or deletion that db staying persistent because it running separately and it has nothing to do with Kube cluster.

  • @AnasAbid-zm1lk
    @AnasAbid-zm1lk 9 месяцев назад

    Hello sir, I wish to thank you for your kind work, I am looking forward to take on this project 1 year after it has been posted and wish to know if the hosting platforms are free and open source to use still?

  • @sjohncreations4369
    @sjohncreations4369 2 года назад

    Very nice tutorial, still haven't finished. The only thing I thought curious is the use of virtual environment inside docker, not sure why to do it. Docker itself serves as a general virtual environment

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +1

      Even the docker container can have Python-based dependencies. Having a Python virtual environment ensures no conflicts can arise.

  • @a1994s
    @a1994s Год назад

    Hi, Please make a video on how to use Docker and kubernetes on the ubuntu located in Hypervisor inorder to deploy the Django Project onto the server.

  • @tsukuyomi9941
    @tsukuyomi9941 5 месяцев назад +1

    Just in case if you are using Windows and stuck on RUN command in Dockerfile and by "docker compose up" you get error 127, check your path, it should be like in the video with bin/ and not Scripts/ as I have thought

  • @unpopularopinions6974
    @unpopularopinions6974 2 года назад

    Create series, would like to add that you can run wsl2 wich is basiclly linux hypervisor terminal in windows

  • @funnynews341
    @funnynews341 Год назад

    Hey men, i'm a big fan of you when i start learn coding and i choice python django. I learned from you so much, but when i made first product, its so slow, i fell slow than js framwork. I hear that Rust is faster than python and learning actix framework. I hope you can teach us build production api web in Rust using actix like django rest framwork. Or how to change from django rest api framwork to actix. Thank you so much.

  • @benyaminaghaebrahimi5073
    @benyaminaghaebrahimi5073 Год назад

    What if there are different Repos, for instance, one for the backend which is Django, and the other one is the front-end repo which is React then how Kubernetes and CI/CD should be handled?

  • @user-zu1gw5dy6z
    @user-zu1gw5dy6z 11 месяцев назад

    What are the differences for using asgi instead of wsgi that would happen to the code, should I just replace wsgi with asgi and make sure to do the dotenv in the asgi?

  • @saisanthan9040
    @saisanthan9040 2 года назад

    Just to clear things out, do we use docker-compose in development and Kubernetes in production?
    Because the postgres_db is not resolving locally in the last part of the tutorial where we create a new Django app. And you don't seem to use docker-compose.

  • @wushu1018
    @wushu1018 6 месяцев назад

    한국인 손!
    Thank you so much!

  • @martinschigoziem3823
    @martinschigoziem3823 2 года назад

    The workspace config file, can you show how to do it on pycharm ? Some of use pycharm

  • @yifeiren8004
    @yifeiren8004 Год назад

    You don't have to worry about python path on Windows at all. Just remember during installer, click on that add to path. Simple and easy

    • @alexCh-ln2gw
      @alexCh-ln2gw Год назад

      you also don't have to worry about virtual env either. what's the point of using docker if you're just going to create another env inside an env. just run your python environment raw inside the container. that's what it's for.

  • @tracencodetechnologies7884
    @tracencodetechnologies7884 5 месяцев назад

    Can you please suggest how to run celery with redis on this configuration?

  • @killshotesports2720
    @killshotesports2720 Год назад +1

    Amazing tutorial and outstading series! I have a question: what if my github repo is shared between our devs and I don't want them to access the secrets. Any tips on this? Thanks!

    • @killaQuip
      @killaQuip 7 месяцев назад

      You can pull the secrets from a separate repository in that case...

  • @wenliangzhang2986
    @wenliangzhang2986 2 года назад

    I am rewatching it and just got a quick question. I am wondering what the reason why you are still using virtual environment when building and runing a docker. Would it be easier to directly install the requirements into docker and run the command directly without using venv? Thanks!

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +2

      When in doubt, use a virtual environment with Python projects.
      When in doubt, use local node_modules with a JavaScript project.
      System-wide dependencies change all the time, this kind of isolation ensures your app is almost always unaffected.

  • @alokpandey9852
    @alokpandey9852 2 года назад +1

    not able to conect with postgress db web service is running db is also running but not able to connect.
    getting the error [[connection to server at "localhost" (::1), port 5434 failed: FATAL: database "myproject" does not exist]]

  • @tracencodetechnologies7884
    @tracencodetechnologies7884 6 месяцев назад

    Can you guide how to add https support to it, including obtaining the certbot certificate

  • @alexanderlindgren9381
    @alexanderlindgren9381 Год назад

    Could you make a tutorial on how to integrate the ELK stack with kubernetes on DO?

    • @janusztarnowski115
      @janusztarnowski115 Год назад

      Simple Application Enter Your Details
      ruclips.net/video/DWn5-Ej8R-M/видео.html

  • @saurabh9446
    @saurabh9446 Год назад

    Can I proceed with the course with just local kubectl for practice

  • @ezekiel6946
    @ezekiel6946 Год назад

    i have a question am having a problem with entrypoint.sh after doing docker built -t . and trying docker run .... it always say exec /ap/entrypoint.sh no such file or directory ... do you have a solution for this problem. cloned your repo and tried the command

  • @projectbank6900
    @projectbank6900 2 года назад

    When debug is false my css doesn't work. What are the solution

  • @prempratapsingh6369
    @prempratapsingh6369 Год назад

    How can we deploy the same on AWS EKS ?

  • @jubilusmaximuslabs7652
    @jubilusmaximuslabs7652 2 года назад

    Great content, I do have a question
    Why not use Git Bash in Windows? and do Linux Commands?
    Why use Chocolatey? is there a reason other than cute chocolate command names?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +1

      Great points! I’ll consider this for the next time around. I actually prefer the subsystem for Linux (WSL) to run and use all the things we need in Docker.
      I tend to think chocolatey is easiest for the most people

  • @sumanthanumolu
    @sumanthanumolu 5 месяцев назад

    My staticfiles are working for django project but not for django app in production. Can you help me ?

  • @viktoraka4190
    @viktoraka4190 Год назад

    I got into this error while creating superuser "error: unrecognized arguments: -- noinput"

  • @guoqiaonz
    @guoqiaonz 2 года назад +1

    django deployment is easy, but k8s make it so complex...

  • @muzafferckay2609
    @muzafferckay2609 2 года назад

    Beynimi yakıyorsun gakko :)

  • @akashk855
    @akashk855 Год назад

    1:29:00

  • @developers_hub
    @developers_hub Год назад

    Doubt ?? In connect to cluster - I made my cluster on azure and setup az aks -get-credentials ****** and so on. Now i m able to access it globally on my computer since a config now exist in my laptop in file"/.kube/config". So to limit the access to current workspace should i remove this file and do workspace settings like u did in the video.
    Because as long as that config file exists in the system inside .kube directory, i can access it from any terminal or any workspace.
    Pls answer this as for the best practice pov.

  • @user-et7hv3oc8h
    @user-et7hv3oc8h 2 месяца назад

    When we setup the docker in the windows machine, the virtual environment file has no bin but has rather Scripts folder. So, if I replace the bin with Scripts in all of your docker setting up parts. It should work as intended right?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 месяца назад

      In this, Docker builds to Linux regardless of what os is crafting the dockerfile

    • @user-et7hv3oc8h
      @user-et7hv3oc8h 2 месяца назад

      @@CodingEntrepreneurs Oh okay, thank you for reply. I appreciate your time.

  • @HariKrishnan-on1yf
    @HariKrishnan-on1yf Год назад

    how you serve staticfiles without whitenoise or nginx

  • @keyh0le
    @keyh0le 2 года назад

    what's the need for python virtual environment inside docker container?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +2

      It will make sure that there will be no clashes between existing Python packages installed through the OS on the Docker container.
      It’s unlikely to happen but it can, using a venv will prevent that.

  • @akashk855
    @akashk855 Год назад

    2:08:00

  • @koushikbalabadruni7240
    @koushikbalabadruni7240 9 месяцев назад

    hey can anyone help me out , I'm getting error on git command I have installed git. i can see the version in the cmd but I cant run any git command in visual studio its showing like this "PS C:\Users\91924\Dev\django-k8s> git --version
    git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
    the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + git --version
    + ~~~
    + CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException"

  • @pedro1p0
    @pedro1p0 Год назад +1

    gunicorn does not work on windows, when i do the step of 58:25, got a error "No module named 'fcntl' "

    • @arjavkanadia9730
      @arjavkanadia9730 5 месяцев назад

      So did you go ahead and complete the project and was it a success?? I am also doing it on windows

    • @pedro1p0
      @pedro1p0 5 месяцев назад

      @@arjavkanadia9730 Nop, It didint work, i had to find a new way, to be fair, i just reset all the project

    • @pedro1p0
      @pedro1p0 5 месяцев назад

      @@arjavkanadia9730 Yes, i worked for a startup in that time, and i and other co-worker complete the project

    • @pedro1p0
      @pedro1p0 5 месяцев назад

      @@arjavkanadia9730 I was using windows and my co-worker using Linux, i dont remember what we did but a thing that i learned ia, always have other way to do things with Django

  • @marcushilliard8857
    @marcushilliard8857 2 года назад

    Did anyone else get an error message when they tried to install psycopg2-binary about the pg_config file not being found? "Error: pg_config executable not found"

  • @AfricanJobs
    @AfricanJobs Год назад

    getting 400 bad request when i docker compose --build, don't know why

  • @rijaltanjung9506
    @rijaltanjung9506 2 года назад

    I'm just wondering how you can run docker compose up without any UserWarning in the terminal at 1:13:16. I ran into a UserWarning in the terminal that said "Not reading /app/.env - it doesnt exist" . I see that you're ignoring it in .dockerignore and that's why the file didn't copied into the image. I'm still confused.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад

      Docker compose does not copy the .env file, it injects it into the runtime for docker.
      think of it like
      docker run -env-file .env my-image-tag

    • @rijaltanjung9506
      @rijaltanjung9506 2 года назад

      @@CodingEntrepreneurs alright I understand now. I missed the point of using env_file in the docker-compose.yml file. Thank you so much, Justin ! I learned a lot from you ! There's no word I can say about how grateful I am to know that your channel does exists. What a quality content ! :)

    • @AyoubIssaadOfficial
      @AyoubIssaadOfficial 2 года назад

      @@rijaltanjung9506 How did you resolve the issue, I keep getting the same userWarning, and when I try to access django admin with the password in my environment it''s not working, someone please help me with this

  • @migy220
    @migy220 2 года назад

    hi! im getting an error: load balancer droplets are down. Crashloopback off. followed all steps.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад

      Did you check the logs of your deployment?

    • @migy220
      @migy220 2 года назад

      @@CodingEntrepreneurs yes, gunicorn is working. however, when i check on describe pod, liveness and readineness probe failed with statuscode: 400.

    • @migy220
      @migy220 2 года назад +1

      @@CodingEntrepreneurs hi!. it works now. thank you

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад

      @@migy220 Awesome! Nice work

  • @jorgeramiroalarconvargas2580
    @jorgeramiroalarconvargas2580 2 года назад +1

    men when you go out is like another chapter of the Mandalorian haaaaaaaaaaaaaaaaaaaa!!!!!!!

  • @ashir3730
    @ashir3730 2 года назад

    I AM COMING HERE IN 3DAYS

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  2 года назад +1

      Prove it

    • @ashir3730
      @ashir3730 2 года назад

      @@CodingEntrepreneurs Sir, I am Just Finalizing My website with Django as backend and then I will push it. But currently, I only know Django with docker. And as I also voted in Forum for Kubernetes with Django. And it's the latest tech too. And the biggest thing. No one is teaching this on the whole web. Except for One And only Sir Justin Mitchell.

    • @ashir3730
      @ashir3730 2 года назад

      Present, Going to start. Let's see, Is that I could be able to Implement it or not.

  • @maloof2826
    @maloof2826 2 года назад

    I could not remember how he populated .gitignore file

  • @armans4306
    @armans4306 Год назад

    Thanks for this great tutorial. Out of interest, could you please explain why you are creating a virtual environment within docker container? I ask this because I never do since the python you are using in that docker container is really only gonna be used within that container and installing virtual environment spins up another python interpreter from global python (installed in docker) which is an extra overhead.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  Год назад

      Virtual environments isolate packages from the global python packages. It’s always a good idea to do this even within a container because a container may have global python packages for other OS-level installed tools

  • @subhankarpadhy5146
    @subhankarpadhy5146 2 года назад

    Hello, I'm facing below issue while running docker-compose. Please help me out
    File "/app/django_k8s/wsgi.py", line 14, in
    from Tkinter import CURRENT
    ModuleNotFoundError: No module named 'Tkinter'
    [2022-02-13 06:06:26 +0000] [11] [INFO] Worker exiting (pid: 11)
    [2022-02-13 06:06:27 +0000] [10] [INFO] Shutting down: Master
    [2022-02-13 06:06:27 +0000] [10] [INFO] Reason: Worker failed to boot.

  • @shishirtimilsena654
    @shishirtimilsena654 Год назад

    requirements.txt
    django>=3.2,