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

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ • 112

  • @Codemycom
    @Codemycom  2 роки тому +1

    ▶️ Watch Entire Flask Friday Playlist ✅ Subscribe To My UA-cam 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 роки тому +4

    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 роки тому +2

    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! : )

  • @falconeight480
    @falconeight480 Рік тому

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

  • @rastaricky9584
    @rastaricky9584 Рік тому

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

  • @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.

  • @nimrodshefi2046
    @nimrodshefi2046 Рік тому +1

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

  • @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!!

  • @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?

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

    Nice very nice explanation! 😁

  • @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"?

  • @InfoTusi
    @InfoTusi 7 місяців тому

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

  • @zdravkojovancevic4591
    @zdravkojovancevic4591 2 роки тому +1

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

    • @ahmed17476
      @ahmed17476 22 дні тому

      You can create a .env file and save the key there then only pass it back when you need it

  • @andrewschneider5722
    @andrewschneider5722 Рік тому

    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?

  • @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?

  • @mohammadrajha5181
    @mohammadrajha5181 2 роки тому +2

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

  • @ETF-DEATH
    @ETF-DEATH 2 роки тому +1

    Thank you for the amazing videos!

  • @LucasBensaid-bs6gu
    @LucasBensaid-bs6gu Місяць тому

    Great video thanks!!

  • @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.

  • @eromoseleedeko3839
    @eromoseleedeko3839 6 місяців тому

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

    • @Codemycom
      @Codemycom  6 місяців тому

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

  • @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 :))))

  • @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?

  • @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.

  • @silaskanku7377
    @silaskanku7377 Рік тому

    How do i connect heroku postgresql in django project

  • @MirasInnovates
    @MirasInnovates 10 місяців тому

    will it work if use mysql not sqlalchemy?

    • @Codemycom
      @Codemycom  10 місяців тому

      Not without changes

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

    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...

  • @alexgreen8231
    @alexgreen8231 10 місяців тому

    Thank you, great video!

  • @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.

  • @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 Рік тому

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

  • @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.

  • @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

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

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

  • @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

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

    Thank you. Appreciated :)

  • @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.

  • @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!

  • @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 :(

  • @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

  • @homosapien5002
    @homosapien5002 2 роки тому +1

    can we visit the website sir?

    • @Codemycom
      @Codemycom  2 роки тому +1

      Of course, why couldn't you?

  • @fauzikurniwan3835
    @fauzikurniwan3835 Рік тому

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

  • @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

  • @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.

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

    Great one !!

  • @skyline-wd3gr
    @skyline-wd3gr 2 роки тому

    You are from which country

  • @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

  • @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

  • @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*

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

    Thanks a lot!

  • @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

  • @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 8 місяців тому

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