34 - Deploy Django to Digital Ocean App Platform - Python & Django 3.2 Tutorial Series

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • 34 - Deploy Django to Digital Ocean App Platform - Python & Django 3.2 Tutorial Series
    Reference Post: www.cfe.sh/blo...
    Try Django 3.2 is a series to teach you the fundamentals of creating web applications with Python & Django by building a real project step-by-step.
    ⦿ Playlist: • Try Django 3.2 - Pytho...
    ⦿ DigitalOcean $100 Promo: do.co/cfe-youtube
    ⦿ Code: github.com/cod...
    ⦿ Subscribe: cfe.sh/youtube
    ⦿ Setup Video for Python 3 & Django 3: • Install & Setup Python...

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

  • @Ricardop621
    @Ricardop621 3 года назад +10

    Hi Justin! Thank you for this comprehensive tutorial series. It's one of the most complete Django series out there in the internet.
    For everyone following this tutorial: make sure there isn't a mismatch between the POSTGRES_USERNAME variable set up in the settings.py file and the environment variable, as Justin pointed out in 44:33. Also, if you have been following along the tutorial and are trying to deploy from your local files, your "home_view" function might take a random integer and query an Article against the database. That might cause some errors after deploying so make sure the query isn't trying to access a register that hasn't been created yet.

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

      Thanks. It's updated now!

    • @Ricardop621
      @Ricardop621 3 года назад

      @@CodingEntrepreneurs Awesome. Thank you!

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

      Excellent point! I've used my own code for this and run into that exact problem as well. It will create a Server Error (500) even though the site works. So it's important to either change the random int generator or to go to "YOUR_APP_URL/articles/create/" (or whatever your own article creation URL is) first and create a few database entries. Then refresh the home page a couple of times and you should see it going from error 500 to a working page anyway (depending on the random number generated of course and how many articles you've generated).

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

      Thanks for pointing it out, Ricardo! My deployment was failing because of the "home_view" function.

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

    This honestly makes deployment SO MUCH easier compared to some other alternatives out there. Thanks Justin!😃
    For testing I've included the postgres db details in my local .env file and connecting to the live database in the dev environment. Working just fine. Just wondering if there are any security issues with that going forward, as long as no one gets hold of my .env file?

  • @ZiOnn-h2z
    @ZiOnn-h2z Год назад +1

    how can i schedule regular job before deployment?? the digital ocean UI changed.. qq

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

    Digital Ocean has made significant changes to the website to the point where the directions in the tutorial do not match up with the current website anymore.
    There is no add component button in settings. My project builds but it does not deploy, I keep getting the error message:
    "Error: No application module specified.
    bash: line 1: trydjango.wsgi: command not found
    Please help!

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

      did you solved it?

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

    Thank you for your tutorial series. I am kind of stuck in selecting between AWS lightsail or Digital Ocean. Which would be your recommendation?

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

    in my application i get an error 400(bad request ) and i don't have a /admin pls help

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

    Option to Add component isn't present in the latest Digital Ocean UI, could you please update the article on how to create the component in this case, Thanks!

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

    Thanks for the great tutorial, watched until the end. How does one connect a redis server to app, platform. If everything was on the same droplet, I could just install redis and continue, but how would that work with the managed version?

  • @SaadGamingz
    @SaadGamingz 25 дней назад

    Can you guide how to deploy the django project on the Azure ? Since Azure provides 100$ credit for Students as well i wanted to know if you could create a Detail guide on it explaining like just you did for digital ocean?

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

    Followed this series to completion, cant thank you enough.
    Was wondering if you've seen this error before during deployment: Requested runtime 'python-3.11.3' is not available for this stack (heroku-18).
    It's specified in my runtime.txt and is supported on all stacks. I'm following the same process that allowed me to launch this tutorial.

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

    to edit the job I don't see "Job Trigger" does that matter? because it can not do the migrations. by the way very good tutorial; your tutorials are worth gold

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

    Unfortunately, the deployment is the hardest part. It doesn't work for me but the thing I wonder is, why in 2022 the various Digitaloceans, AWS, Google Cloud, etc. etc. fail to make life easy for developers. Basically they should just do their job. No way.

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

      Check out my Django & Kubernetes series, it might clear things up for you with this one.
      Believe it or not, deployment used to be 10x harder.

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

      @@CodingEntrepreneurs you got to be kidding me.

  • @MikeSosnow
    @MikeSosnow 10 месяцев назад

    Earlier on I got an error when building that the python being used is outdated and is no longer supported. I followed the link they provided for the new python versions they support and changed the runtime.txt the production branch to a python version that is now supported. Don't know if that will really break anything moving forward, but it wouldn't allow me to build with the outdated python.

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

      Nothing in here should break with even Python 3.12 - there might be a few import changes in Django but other than that, Python 3 is Python 3.

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

    please do I have to put my env folder in the same directory as my wsgi file for me to be able to deploy on the digital ocean app platform?
    because I am having a no module found error

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

    Hi Thank you a lot for this tutorial. I have a question. I need the ffmpeg packet to be installed, how can I do it? I tried the console but I cant get the root right, and didn't find any other way that I can install the ffmpeg in this, so to say"droplet". Do you maybe know how it can be done?

  • @11folders
    @11folders 2 года назад +1

    32:10 The "+ Add Component" button is missing from the Settings tab. Does anyone else have the same issue?

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

      Yep, ehre isn't any button. Just do Actions>Create Resources, and then choose job from one of the submenus.

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

      Have you found the solution for this? In the DO tutorial it is also used for collecting static files. Did you manage to find a turn around ? Thanks

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

      Any solution?

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

    i am getting this error "OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k"

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

    If I use ${db.PORT} the job shows invalid integer value "{db.PORT}" for connection port. I have put the db name correctly. Please can you tell me what might be the problem?

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

    Hi Justin! Thank you for this amazing series! I ran into some problem when follow this video.
    I have the same "Sever Error (500)" code. I have check the migrate job and it is running properly, the admin page worked fine but others (home, login, logout,...) all return "Server Error". I turned debug = 1 and deploy again, it tell me that "the templates doesn't exist" but the same code work fine on my local machine.
    I'm using my own code instead of your git-hub "production-1" code, so it might be something that I've missed?
    Thank you!

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

      Sounds like the template path issue

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

      Also thanks!

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

      @@CodingEntrepreneurs Thanks for your reply! Is there some way that I can resolve this? The template path worked fine on my local host. I have tried to re-commit every thing to github but the same problem still occur.

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

    Why creating a super user should be a pre deploy job?? Only nigration wont be enough??

  • @AngelHernandez-ex7ji
    @AngelHernandez-ex7ji 2 года назад

    I got unable to Unable to get build logs for component 'app' after creating a job

  • @diegogranados4668
    @diegogranados4668 10 месяцев назад

    somebody can help me with this error: error validating app spec field "services.name": services.name in body should be at least 2 chars long

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

    Is anyone else having a problem connecting the repo to the DO account? "Sorry, we couldn't find an app in your repo". Tried several branches (main, production-1, production-*), all of them throwing the same error.

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

      Go on GitHub and remove the authorization to the app and try again

  • @jessekeogh
    @jessekeogh 3 года назад

    Im having an error where after the gunicorn run command is executed it displays ModuleNotFoundError: No module named 'my_django_site' any ideas why im getting this? done exactly as you have in video

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

      What’s your gunicorn command?

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

      @@CodingEntrepreneurs i am having same error too.

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

      i have the same problem
      on the deployment logs i have:
      bash: gunicorn: command not found
      bash: line 1: netdeploy.wsgi: command not found
      and the deployment building never ends

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

    my statics files are missing, kindly help

  • @diegogranados4668
    @diegogranados4668 10 месяцев назад

    9:00 database is not longer free

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

    is the same think as a droplet? or is that something else?

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

      Something else

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

      This is a managed service. Droplets are just VMs

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

      There you have to do everything from scratch. No GUI interface, just only the command line. Generally, people use Linux Ubuntu. But I will deploy this future server with droplet because truly writing it feels like you are coding. But indeed everything is just from zero. So of course, things will be painful and amazing at the same time.

  • @erinling8908
    @erinling8908 3 года назад

    Hey Justin, great tutorial. I have a question, wonder if you could assist me in this. I am creating a web app to host and it's an app with 20 fixed chat rooms, each room constantly having 5 students (so 100 users total) where members of the group can discuss the group project through chat in their respective room. What do you think the pricing for something like this be? I know it's hard to gauge with so little description, but anything will do. I want to know what I'm getting myself into, as a student a 200$ bill for example is a no-go.

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

    Step 1. Sign-up to DO. Step 2. Enter credit card info. Step 3. Do blocks your account ! why ?

  • @alfagroupkz
    @alfagroupkz 11 месяцев назад

    Hello there from 2023.. So there is no "+ Add Component" button anymore =)

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

    So I tried forking this repo, it only forked the main branch- so I can't follow this tutorial, pls delete this if it is no longer valid- nevermind i figured it out- This doesn't work at all-

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

    my card is not working welp i guess ill go ahead and not use digital ocean

  • @swejdfhdhffh
    @swejdfhdhffh 11 месяцев назад

    Oh man, your videos have great content but holy shit you do waaayy to much smalltalk and soooo much unnecessary information. Its making me aggressive. oh my god.

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

    I keep getting this error:
    psycopg2.errors.UndefinedTable: relation "django_site" does not exist
    LIINE 1: SELECT (1) AS "a" FROM "django_site" LIMIT 1
    django.db.utils.ProgrammingError: relation "django_site" does not exist
    LINE 1: SELECT (1) AS "a" FROM "django_site" LIMIT 1
    Where could I possibly find the mistake?