Deploy Flask App With Database On Heroku For Webhosting - Flask Fridays #39

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

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

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

    ▶️ Watch Entire Flask Friday Playlist ✅ Subscribe To My RUclips Channel:
    bit.ly/3ig2eJn bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/2L1jBl5

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

    I had been banging my head against the wall for hours trying to host my web app on Heroku. Thank you so much for putting up this video....I just wish I had found it earlier!

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

      Glad you got it sorted out!

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

    This tutorial just did the magic! I've been able to deploy my flask app on heroku, thank you!

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

    Thanks man! I really needed a comprehensive tutorial on hosting a Flask app on heroku. Thank you very much! : )

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

    Your videos are really helpful for my current project... Thanks! It would be cool if you do video on how to create a chat app in Flask website.

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

    7:37 is what I've been looking for thank you

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

    I couldn't get this to work, but whatever because I saw your video "Heroku Decided To Screw Over All Coding Students!".

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

    Thank you very much for all the series!!

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

    with heroku cancelling the free version a few months ago, which cloud service do you recommend to use?

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

    Excellent video…like how you went straight to the point…ne subscriber❤

  • @ETF-DEATH
    @ETF-DEATH 2 года назад +1

    Thank you for the amazing videos!

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

    Hi man! Nice video.
    But when I in get bash on heroku login press enter it just freezes and nothing hapening? Why is that? Anyone guys have this problem?

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

    I have one more question.. How to hide your app.config['SECRET_KEY'] when pushing to the GitHub?

  • @aditya.21
    @aditya.21 Год назад +1

    Hey! John, How's it going for you?
    I am a student and basically do not have a credit card yet, because I don't earn enough. What can be an option to this?

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

    Thank you, great video!

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

    Great video - if you have your app.py in a sub folder like /backend how do you point to that correctly in the Procfile if that is in the root folder? Is it something like "web: gunicorn app:backend/app"?

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

    Nice very nice explanation! 😁

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

    Thank you. Appreciated :)

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

    how i can download git to work git add . in terminal on windows 10

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

      git-scm.com/download

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

    Heroku new update states that they do not offer Postgres free of charge anymore. What are your thoughts? Should I go with one of their plans or look for something else? (P.S. I am new to Heroku and I don't know what to expect)

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

      Yes, it's no longer free...I don't yet have a free alternative.

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

    Awesome Video. What do I do if I need to update the database on heroku. Can I acess it from my local machine and run ETL routines from it?

  • @9-saurabh
    @9-saurabh 2 года назад

    Thank you So Much ! really helped me a lot :))))

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

    Thanks a lot!

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

    How do I copy all the info from my sqlite db file to the heroku postgres database?

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

    *Sir, please teach Go programming language. And host its website on heroku. It very easy and very very speed (go is as speed as C++).*

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

      Might do that at some point

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

    How would you handle using dotenv for managing keys for API's? Can't upload the env file to git so how do we make a env file available to the heroku app?

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

    Great one !!

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

    SQLAlchemy 1.4 doesn't work directly with Heroku. You will get the error, "sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres" when you try to create the database. The easiest solution is to pip uninstall SQLAlchemy 1.4 and redo with a pip install SQLAlchemy ==1.3.23

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

      To fix this, rename postgres:// in the URL to postgresql://

    • @MetaFisica.
      @MetaFisica. 2 года назад

      it's not working for me

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

      @@wnywebdevelopment8757 just for anyone else: this suggestion to change the name to ‘postgresql’ in app worked for me. Thank you!

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

      @@MetaFisica. me too :(

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

    Hi John! I came across your website and I’m looking to join. I want to eventually become a ROR developer, but first want to learn Ruby before getting into ROR. I am just wondering which Ruby course of yours you’d recommend me to start with - Intro to Ruby Programming or Ruby Programming For Everyone?

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

      Either one, they're very similar. Try Ruby for Everyone.

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

    All are explain about heroku only. How to deploy in cpanel with database please make a video i tried so many times but i ended up with irrelevant tutorials. I hope i will get solution here

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

    Thank you for this video. How to paste that code for my Django setting. I do not have app.config! Where do I suppose to put the code?

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

      You have to just follow the directions in the video.

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

    hi I really like this video! Now I am working on my side. One question I am wondering is, if we already have a database in sqlite, how can we use this current database instead of creating a new one?

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

      I don't have any videos on that, and you definitely wouldn't ever want to use sqlite for production

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

    most of the resources i find are using bash shell. isn't there a way to use powershell on Windows to do these things?

  • @eromoseleedeko3839
    @eromoseleedeko3839 3 месяца назад

    Hi John thsnks for the video, but what if i want to use a domain i bought from say namecheap or godaddy

    • @Codemycom
      @Codemycom  3 месяца назад

      Go to settings in heroku and enter it there where they ask for it.

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

    can we visit the website sir?

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

      Of course, why couldn't you?

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

    Sir John,
    Make a tutorial video that show *how to push/collect the byte stream of any image which is set as Pixmap Image of any label in PyQt5 Programs to database like postgress using just python*

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

    I'm getting the error dash.exceptions.DependencyException: Error loading dependency. "dash" is not a registered library. can you help? i've reinstalled dash and the problem continues...

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

    My db is in my __init__ file within the website folder. app.py is outside the website folder. How do I import the db in that case? "from website import db" isnt working.

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

    Thanks a lot for you video! Super helpful. What do I do if I want to populate the database on the webserver? For example there are some pre-existing users that should be ready to query when the app is created. In local environment I do session.add and session.commit in the flask shell but not sure where to do it in webhosting. Could you please give some guidance?

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

      Guess the questions is more about how to copy data from local sqlite database to production heroku postgres db. Would appreciate any help!

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

      Sorry, I don't have any videos on that.

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

    How do i connect heroku postgresql in django project

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

      this is a flask video

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

    HELLO SIR, I AM MAKING A SERIOUS PROJECT ON FLASK..RIGHT NOW GOT STUCK ON A PROBLEM .
    CAN YOU PLEASE HELP ME. I HAVE TRIED MANY( A LOT) PEOPLE TO COMMUNICATE MY PROBLEM BUT NONE OF THEM CAN'T SOLVE THAT PROBLEM. THE PROBLEM IS VERY LITTLE BUT AS A LEARNER I DON'T KNOW HOW TO MAKE IT RIGHT.
    SIR IT WOULD BE GLAD IF YOU HELP ME

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

    Hello, John! I have a problem. In the terminal all looked good, but when I went to browser I got an error message under my Heroki app url: "Application error
    An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
    heroku logs --tail". How to fix it?

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

      Do what the error says. From the terminal: heroku logs --tail

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

    will it work if use mysql not sqlalchemy?

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

      Not without changes

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

    Is it fully free? Can i still use it if i dont have credit card?

  • @evil.corporate
    @evil.corporate 2 года назад

    it is saying 'from' isnt a bash command, when i try to import app to db, what is wrong?

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

      Why would you ever type in "from" into the bash terminal? I think you forgot to first enter the python shell.

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

    Hello, I'm trying to deploy a complex flask app, build with factory pattern and I have some problem due to the interpreter paths. Locally from PyCharm IDE, I can set them manually, but how can I do something similar from Heroku, or maybe from code? Thank you in advance!!!

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

      No clue, I don't use Pycharm and recommend that no one else use it either...this is just another reason why.

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

    Hello sir actually i am using sql database with python using flask ,I am getting bad request The browser (or proxy) sent a request that this server could not understand. Can you please help with this pleaseee....😥

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

      You'll have to google the error

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

    Can an Web app, using Phyton, flask, database, and ionosphere eb hosting

  • @skyline-wd3gr
    @skyline-wd3gr 2 года назад

    You are from which country

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

    i am having a flask python app with cv2 dlib libraries in it from ML models. But there is application error and its showing different errors everytime. Is this the same process for such (ML - dlib - opencv) based apps as well?
    And since it is having dlib and tensorflow the slug size exceeds as well

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

      Should be. Give it a try and see

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

      If you want to deploy DL,CNN model I suggest you go for paid plans or AWS. I have faced this issue with Pytorch, use CPU packages only; Optimise imports, and use lower version packages. This gelped me reduce my slug size from 1.1GB to 480MB. But the real issue is when it loads up. My App RAM usage was 1.4 GB and it was impossible to optimise it. It will crash and exit in heroku free version. Hope this helps.

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

      @@rutwikpatil8491 thanks. I will try

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

    do you have a similar video for flask and mysql?

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

      No, but why would you want to use Mysql?

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

      ​@@CodemycomHello, i wondering the same question. I always use MySQL, so I would like to use again, Is posible or not? Thanks

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

    hello there. Thank you for the video. I have a question about db.create_all(). My db is initiated under /website/__init__.py file. I tried "from website import db" then db.create_all(). Then I get this Runtimeerror: No application found. Can you please help? thank you!

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

      what did you do differently from the video?

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

      @@Codemycom I followed the steps in the video exactly. The only difference is that my app and db is created under /website/__init__.py file instead of the app.py file under the main folder.

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

      @@icecube721 then you didn't follow the steps in the video exactly

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

      have you figured it out? if you haven't yet and if you followed another tutorial for a notes website, you don't need to do the db.create_all() at all. once you've deployed it to heroku, the db is already created and set up. the issue is with sqlalchemy only able to handle postgresql

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

      I have the same issue. I too modulated the project so its split into small er files rather than the entire app in one app.py file. It should be possible but I cant figure it out, if you find the solution please share it. Thanks!

  • @skyline-wd3gr
    @skyline-wd3gr 2 года назад

    Upload videos on sql database

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

      Already have a course on sql database at Codemy.com

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

    42

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

    If your server doesn't work you my need to change the db url postgres:// to postgresql://.