Push Flask Apps To Heroku For Webhosting - Python and Flask #11

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • In this video I'll show you how to push your Flask App to Heroku for Webhosting for free!
    Webhosting apps can be tricky, but it doesn't have to be. In this video we'll install the gunicorn web server, create a requirements.txt file and a Procfile, set up git version control, install the free Heroku toolbelt, and then push our app to Heroku for webhosting.
    Heroku has a free tier, and that's what we'll use to host our Flask App.

ความคิดเห็น • 294

  • @Codemycom
    @Codemycom  4 ปีที่แล้ว +5

    ▶️ Watch Entire Flask Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/2TU96lm 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

  • @EUU100
    @EUU100 3 ปีที่แล้ว +4

    Thank you!
    Btw for anyone who this might help, you can also pretty much do all of this manually on github, creating the requirments and procfile. to get the libraries for your requirements file just use 'pip list' copy and paste the files and make sure in between the name and version have ==, like this package==1.0.1 for example. but i did use gitbash to push the actual project to my github
    Thanks again!

  • @YazhShah
    @YazhShah 3 ปีที่แล้ว +11

    High quality content in 10min

  • @yihongkembabazi
    @yihongkembabazi 3 ปีที่แล้ว +1

    Thank you for the detailed explanation!!! I'd been trying to deploy my app but didn't really understand about Procfile (just did through this video) 😂😂 can't believe how easy it was.

  • @TechWithSabri
    @TechWithSabri 4 ปีที่แล้ว +3

    Great tutorial! because of you sir i finished this tutorial maybe in 3 hours after 2 months of your Django tutorial i loved it thank you again so much

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      Glad it helped!

  • @macklemo5968
    @macklemo5968 3 ปีที่แล้ว +2

    this was so satisfying to deploy my first own project online! Thank you so much for this decent tutorial

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Very Welcome!

  • @qrdr
    @qrdr 3 ปีที่แล้ว

    I have tool required secrets.. then add it to requirements.txt but when install it say no module openSSL then add pyOpenSSL to requirements.txt I installed it normally but it still no module openSSL Please do you have any solution?

  • @harshitsomani1717
    @harshitsomani1717 3 ปีที่แล้ว +1

    AT 6:03 when you added period you got many statements that showed it was successfull,but when I do the same I am not getting anything,no error or no statements,I am using vscode in macos ,what can I do?

  • @JuankaGC
    @JuankaGC 3 ปีที่แล้ว +3

    Thanks for the tutorial! :)
    I'm using a conda environment and the requirements file listed too many packages causing several errors during the package collection afterwards. In case it can be useful for somebody, this is what I did:
    Create the requirements file without containing packages that are dependencies of others (so that it lists less packages) and in the correct format:
    $ pip list --not-required --format=freeze > requirements.txt
    I hope it can be helpful.
    App running properly! :)

  • @TECNOMUNDOCHANNEL
    @TECNOMUNDOCHANNEL 3 ปีที่แล้ว +5

    How do I upload my local database to heroku?

  • @darkchoclate
    @darkchoclate 2 ปีที่แล้ว

    Great tutorial... Thank you... But one thing that i faced that is not mentioned here, that you sometimes manually need to enable gunicorn in recourses section of heroku dashboard, or webprocess wont run...

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      I've never had to do that

    • @darkchoclate
      @darkchoclate 2 ปีที่แล้ว

      @@Codemycom following the tutorial, I faced it, so i thought it may help others... I previously worked ith heroku making some bot, i didn't not face before but this time...

  • @chiedozieehirim5659
    @chiedozieehirim5659 2 ปีที่แล้ว

    Thanks a lot.
    I followed all the steps but I keep getting this Application Error whenever I open my page.
    Please what are the causes and solutions?

  • @zixuanjia9637
    @zixuanjia9637 4 ปีที่แล้ว +1

    Do you know why I am getting this message?
    ERROR: Could not find a version that satisfies the requirement anaconda-client==1.7.2 (from -r /tmp/build_126e3b30/requirements.txt (line 3)) (from versions: 1.1.1, 1.2.2)
    remote: ERROR: No matching distribution found for anaconda-client==1.7.2 (from -r /tmp/build_126e3b30/requirements.txt (line 3))

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      No clue, I don't use anaconda

  • @nayantarakotoky8160
    @nayantarakotoky8160 2 ปีที่แล้ว

    How to download or collect the form data into, say, a txt file? The database is running properly so the names are getting added and not deleted after the app is restarted. But how to download/collect that data for offline processing? Please help!

  • @schawanji
    @schawanji 3 ปีที่แล้ว

    🤗 I have finished the whole Into to Web Dev with flask
    playlist

  • @widmarraulquispeleon1583
    @widmarraulquispeleon1583 3 ปีที่แล้ว +11

    there is always a good bald in everything ... congratulations ...!! xD the best video ...!

  • @YazhShah
    @YazhShah 3 ปีที่แล้ว +1

    I have one question I have successfully deployed my flask app but if I make a change to one of the files locally then push it to the repository. How can I update that change onto Heroku ? or would I just do git push heroku master after making the change.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      push it into heroku again in the same way

  • @andreriveravega
    @andreriveravega 3 ปีที่แล้ว

    Thank you very much, I have not found an explanation in Spanish, I do not speak English but I understood you perfectly.

  • @lifeislarge
    @lifeislarge 4 ปีที่แล้ว +2

    My flask app runs perfectly on local machine but "application error" is displayed after deployment to heroku i have procfile and requirements intact but all this happening.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      What exact error are you getting?

    • @skrim6952
      @skrim6952 4 ปีที่แล้ว

      Just try to find error in log

  • @donzaalastudio6980
    @donzaalastudio6980 3 ปีที่แล้ว

    Awesome :) I knew nothing about heroku but you made it so simple and easy to understand. Thanks man

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad I could help!

  • @Faisal-jo5vk
    @Faisal-jo5vk 2 ปีที่แล้ว

    im using cs50 ide and it shows me this error message when i do git push heroku master :-
    ERROR: Could not find a version that satisfies the requirement ikp3db==1.4.5 (from versions: 1.0, 1.1, 1.1.2, 1.1.3, 1.1.4, 1.4.1
    i tried changing ikp3db to 1.4.1 but it didnt work😕

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      You have to use the tools that I use in the video if you want the result that I get.

  • @zehe6871
    @zehe6871 3 ปีที่แล้ว +1

    Thank you so much for creating this series. I really learnt a lot and now it's a good start for me to create my own website.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Great to hear!

  • @carlosduque5174
    @carlosduque5174 2 ปีที่แล้ว

    This was easier than I expected, thank you so much!!!

  • @pradeepchandrasekaran272
    @pradeepchandrasekaran272 3 ปีที่แล้ว

    I was able to host the app to Heroku. I also uploaded apple-app-association file inside the well-known folder, but when I try to access it through URL, it returns 404 error "Not Found
    The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      check your heroku logs for the error.

  • @jlesseyp
    @jlesseyp 4 ปีที่แล้ว +4

    Great tutorial! Just what I needed. Simple and effective info.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +2

      Glad it was helpful!

  • @Ovicron
    @Ovicron 4 ปีที่แล้ว

    Web hosting feels so complicated, this tutorial makes it seem easy. Liked and subbed.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      That's why I like Heroku ;-)

  • @stevenfernz96
    @stevenfernz96 3 ปีที่แล้ว

    Hi. Im using application factory of flask app tried to upload it on heroku but failed. can yuh tell me what procfile should look like.
    Flask File structure:
    app -
    static -
    template -
    __init__.py
    env -
    ProcFile
    req...txt

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      I show you everything you need in this video

  • @anuragshrivastava7855
    @anuragshrivastava7855 3 ปีที่แล้ว

    i have seen so many videos but this the best

  • @soupnoodles
    @soupnoodles 2 ปีที่แล้ว

    Informative video. Thank you.

  • @KonstantinPrydnikov1
    @KonstantinPrydnikov1 3 ปีที่แล้ว

    Thanks man, it's first time in my live all had done without any trouble, exactly as you show.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad it was helpful!

  • @arsenatexe
    @arsenatexe 3 ปีที่แล้ว

    i have deployed my app but "Internal server error" is showing

  • @jwrestler7
    @jwrestler7 2 ปีที่แล้ว

    Thanks for the great vids! This has helped tremendously. The only problem I seem to have is with the very end. When I do the heroku login and press the key, nothing happens. I tried doing the heroku login -i but I enter my email address and again, nothing happens. Have you encountered this problem before? I verified that Heroku was added to PATH and I also added system32 to PATH

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      You need a web browser open when you hit enter.

  • @8koi245
    @8koi245 2 ปีที่แล้ว

    omg tysm!! I was finally able to use heroku!!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Happy to help!

  • @haze13_
    @haze13_ 2 ปีที่แล้ว

    ur actually a legend for this

  • @k0kuyo133
    @k0kuyo133 3 ปีที่แล้ว +1

    Hello, I tried to deploy my Flask app with the filename __init__.py and in Procfile i put:
    web: gunicorn app:__init__
    but when I push it to Heroku, it said no module named flask. Can someone help?

    • @2udu-hacks141
      @2udu-hacks141 3 ปีที่แล้ว

      the tree should be like this :
      project folder /{directory name} / __init__.py
      project folder / run.py
      project folder / Procfile
      inside the Procfile ---- add this lines {web: gunicorn run:app}
      ##
      add this line in run.py
      from {name of the directory where you __init__.py file belongs} import app
      if __name__ == "__main__":
      app.run()
      ##
      now push this to your heroku host.
      hope this will work for you . :)

    • @k0kuyo133
      @k0kuyo133 3 ปีที่แล้ว +1

      @@2udu-hacks141 hey thanks for ur reply. I managed to fix it. Turned out the heroku install via pipfile.lock so the requirements.txt was not used. I created the filelock with pipenv freeze.

  • @mstech2984
    @mstech2984 2 ปีที่แล้ว

    when i do heroku login and enter any key nothing happens , the browser doesn't open, what should i do

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Close all your browsers that may be open, then open a new browser yourself. Just one, no other tabs. Then do the commands again.

  • @gaurishagrawal9404
    @gaurishagrawal9404 3 ปีที่แล้ว

    My app deployed but I am getting a error on url page:
    Application error
    If you are application owner check out the logs...

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Did you check the logs?

    • @gaurishagrawal9404
      @gaurishagrawal9404 3 ปีที่แล้ว

      @@Codemycom Yes its giving me soe h14 error. I looked it up, but cant figure out whats wrong.

  • @muhammadkamalazmi9914
    @muhammadkamalazmi9914 3 ปีที่แล้ว

    Hi, I have a question. What if our app needs to open client's webcam? How do we do that?
    Locally, we can just use cv2.VideoCapture(0) to stream our webcam. But it doesn't go that way whenever the app is deployed.
    Thx :)

    • @huntex4050
      @huntex4050 3 ปีที่แล้ว

      u got the answer???

    • @muhammadkamalazmi9914
      @muhammadkamalazmi9914 3 ปีที่แล้ว

      @@huntex4050 hi, nope, I haven't. would you mind to share me a thing? :)

  • @mariamkhanam4037
    @mariamkhanam4037 2 ปีที่แล้ว

    Brooo.... Heroku is no longer free From November 28th, 2022... Can you make a video on alternative to host flask

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      yeah, I plan to

  • @deadphim
    @deadphim 2 ปีที่แล้ว

    Oh my god thank you I've been trying for hours to get this done

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Glad you found it!

  • @osiris5449
    @osiris5449 2 ปีที่แล้ว

    in perfect order too brother, you got one from node to python to php to git to heroku?! that's what i was working in but a virus ruined my computer!!! :(

  • @WhatsAnIdea
    @WhatsAnIdea 2 ปีที่แล้ว

    not able to configure flask code on heroku, can u help?

  • @nathulkumar3368
    @nathulkumar3368 4 ปีที่แล้ว

    Could not find a version that satifies the url in requirements. Plz help!!

  • @junjielim6734
    @junjielim6734 3 ปีที่แล้ว

    Hi, there is an error that occurs after executing the command "git commit -am 'initial commit'"
    fatal: paths 'commit' ...' with -a does not make sense
    May I know how to solve this?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      you're using the wrong terminal

    • @junjielim6734
      @junjielim6734 3 ปีที่แล้ว

      @@Codemycom yup, I solved it already. And also thanks for your tutorial , it helped me a lot 😎

  • @FilthySnob
    @FilthySnob 3 ปีที่แล้ว

    how come you had the dB ready on the heroku server out of the bat? I didn't even have posters add on installed ?!

  • @plusk343
    @plusk343 4 ปีที่แล้ว +6

    The best thing about you is the positivity that you radiate!!!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      Thanks!

    • @plusk343
      @plusk343 4 ปีที่แล้ว +1

      @@Codemycom MOST WELCOME JOHN! This video has just 1 dislike!!! That a greater success than having a million subs!!!!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      @@plusk343 Ha, I'm not sure about that!

    • @plusk343
      @plusk343 4 ปีที่แล้ว +1

      ​@@Codemycom Anyways, people like you, Corey Schafer, Tech With Tim, and sentdex are the legends that help a high schooler like me to learn Python just the way I want to. At my school, even my computer teacher doesn't know Python as much as I know and all that is just because of you all. How on Earth can I thank you all!!!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      @@plusk343 You just did ;-) glad I could be helpful! And btw, I knew more than my high school computer teacher too when I was that age ;-)

  • @Aymeric486
    @Aymeric486 3 ปีที่แล้ว

    hello, nice video :) i have a question: right now my flask allow me to read/ write on a file with (open in python). If i push flask to heroku, do you think i will still be able read and write my files ? or will there be security issues? Sorry for my english :)

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      It should be ok, as long as those files are also pushed to heroku

  • @bellcanada719
    @bellcanada719 2 ปีที่แล้ว

    no module named app
    but i have a search.py and i named the app:search in procfile is it to be search:search?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      You could have tried it and seen faster than asking :-p

    • @pjmclenon
      @pjmclenon 2 ปีที่แล้ว

      hello i left this project cuz it wasnt working so going on memory it dodnt work when i left it; sowe name it what exactly? sorry but asking is how i learn as well as trying ok thxz Lisa

  • @mahadevan6618
    @mahadevan6618 2 ปีที่แล้ว

    Has anyone seen the error
    Paths 'commit' ...' with -a does not make sense
    When running git commit -am 'initial commit'

  • @kevinalexanderrodriguezria6555
    @kevinalexanderrodriguezria6555 3 ปีที่แล้ว

    gunicorn only works on unix based systems?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Of course not, I'm on Windows

  • @aakarshkumar6935
    @aakarshkumar6935 3 ปีที่แล้ว

    What to do:
    ERROR: mysqlclient-1.4.6-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
    remote: ! Push rejected, failed to compile Python app.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      We use sqlite in this video, not mysql. You need to find instructions on how to use mysql with flask and heroku

  • @lameckotieno5837
    @lameckotieno5837 3 ปีที่แล้ว

    Honestly, this is the best flask tutorial...been wasting time on other videos kindly make a video on sessions and any other basic stuff in flask otherwise thanks a lot

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      I just started a new Flask Fridays playlist...we'll get into it there.

    • @lameckotieno5837
      @lameckotieno5837 3 ปีที่แล้ว

      @@Codemycom Thanks

  • @HeroSphereTCG
    @HeroSphereTCG 3 ปีที่แล้ว

    Can you embed a herokuapp on your own website? I created a game in python and want to host it on my own website.

    • @boluro-ajayioluwaseun8813
      @boluro-ajayioluwaseun8813 3 ปีที่แล้ว +1

      yes i think you can, it will just be in the form of a subdomain.

    • @HeroSphereTCG
      @HeroSphereTCG 3 ปีที่แล้ว

      @@boluro-ajayioluwaseun8813 cool! Thanks!

  • @wealthcrowns4485
    @wealthcrowns4485 2 ปีที่แล้ว

    Great video. Could you create another video with postgres db and deploy to heroku

  • @abdelkassem451
    @abdelkassem451 3 ปีที่แล้ว

    Hello, how can you upgrade python 3.6 to 3.8 in that case? I have some library issues because of that.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      In what case? Just download and install 3.8 if you want.

  • @uisaerospace6677
    @uisaerospace6677 2 ปีที่แล้ว

    Thank you very much, this was very useful! Liked and subbed

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Happy to hear it!

  • @himanshukarki
    @himanshukarki 2 ปีที่แล้ว

    thanks man.... Its exactly what i was looking for. Great help

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Happy to hear it!

  • @Magniton1
    @Magniton1 3 ปีที่แล้ว +2

    Just an fyi, if you need to update the version of your Heroku app for a new version of Python, you will need to make a runtime.txt file to tell Heroku to not run the Python 3.6.6 version.

  • @anuragdhyani1712
    @anuragdhyani1712 3 ปีที่แล้ว

    very nice video thanks for the wonderful and easy explanation.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad you enjoyed it! Thanks for watching!

  • @aryanpanwar6399
    @aryanpanwar6399 3 ปีที่แล้ว

    How do I make it so that it is visible on google search aswell??

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Google will find it sooner or later.

  • @gisandweb5394
    @gisandweb5394 4 ปีที่แล้ว

    git push heroku master
    Push rejected to geedatavisualization.
    error occur can you can explain me why this was happen

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      What's the entire error message?

    • @zixuanjia9637
      @zixuanjia9637 4 ปีที่แล้ว

      @@Codemycom Got the same error: remote: ! If you are developing on a branch and deploying via git you must run
      remote: !
      remote: ! git push heroku :main
      remote: !

  • @erdoganyildiz617
    @erdoganyildiz617 3 ปีที่แล้ว

    Hey, thanks for the video! I am wondering why did we create a virtual environment on our local machine? We didn't install any packages in the virtual environment. What exactly is it used for? Thanks :)

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      We installed flask in there...it's standard practice always with anything python to create a virtual environment for your project.

  • @mohammadsoroushzadeh5684
    @mohammadsoroushzadeh5684 3 ปีที่แล้ว +1

    Why didn't you use gitignore file?!!

  • @whitehat-it-4096
    @whitehat-it-4096 3 ปีที่แล้ว

    Все что я пробовал - давали ошибку Application error, этот метод дал такаю же ошибку

  • @ranjanpal7217
    @ranjanpal7217 3 ปีที่แล้ว

    Amazing...Also plz make a video on how to push csv/jpg files to Heroku cloud using python

  • @sripriya649
    @sripriya649 3 ปีที่แล้ว

    How to deploy an app with oracle db connection using instant client to heroku?

  • @scoutee
    @scoutee 2 ปีที่แล้ว

    you're the best. thank you so much

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Very welcome!

  • @_SarveshJoshi
    @_SarveshJoshi 4 ปีที่แล้ว

    The terminal freezed after "Total 2153 (delta 311), reused 0 (delta 0), pack-reused 0" nothing happening :(

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      restart it and try again

  • @gioviiaco
    @gioviiaco 2 ปีที่แล้ว

    Thanks for the tutorial but be careful for the xss attack cause the web app is still online

  • @ReemTelbani
    @ReemTelbani 3 ปีที่แล้ว

    Thanks for this awesome simple video.
    I followed every single step as you did exactly, but when it comes to "git push heroku master
    " part , it gave me an error. I wrote the error down here , could you help me with that error?
    $ git push heroku master
    Enumerating objects: 12053, done.
    Counting objects: 100% (12053/12053), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (9815/9815), done.
    Writing objects: 100% (12053/12053), 256.79 MiB | 194.00 KiB/s, done.
    Total 12053 (delta 1803), reused 12053 (delta 1803)
    remote: Compressing source files... done.
    remote: Building source:
    remote:
    remote: -----> Building on the Heroku-20 stack
    remote: -----> Determining which buildpack to use for this app
    remote: ! No default language could be detected for this app.
    remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
    remote: See devcenter.heroku.com/articles/buildpacks
    remote:
    remote: ! Push failed
    remote: Verifying deploy...
    remote:
    remote: ! Push rejected to ecpredictor.
    remote:
    To git.heroku.com/ecpredictor.git
    ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'git.heroku.com/ecpredictor.git'

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      it can’t tell what sort of app you’re using...which means you skipped a step. rewatch the video and give it another try.

    • @ReemTelbani
      @ReemTelbani 3 ปีที่แล้ว

      ​@@Codemycom I tried again and I got a new error..
      my python version is 3.8.9,
      I built a new virtual environment using this version,
      re-installed the needed libraries in the new environment
      created the requirements.txt and the Procfile
      also added "Python-3.8.9" line
      in available
      $ git push heroku master
      Enumerating objects: 12215, done.
      Counting objects: 100% (12215/12215), done.
      Delta compression using up to 4 threads
      Compressing objects: 100% (9964/9964), done.
      Writing objects: 100% (12215/12215), 173.94 MiB | 329.00 KiB/s, done.
      Total 12215 (delta 1822), reused 12215 (delta 1822)
      remote: Compressing source files... done.
      remote: Building source:
      remote:
      remote: -----> Building on the Heroku-20 stack
      remote: -----> Determining which buildpack to use for this app
      remote: -----> Python app detected
      remote: ! Requested runtime (Python-3.8.9) is not available for this stack (heroku-20).
      remote: ! Aborting. More info: devcenter.heroku.com/articles/python-support
      remote: ! Push rejected, failed to compile Python app.
      remote:
      remote: ! Push failed
      remote: Verifying deploy...
      remote:
      remote: ! Push rejected to ecpredictor.
      remote:
      To git.heroku.com/ecpredictor.git
      ! [remote rejected] master -> master (pre-receive hook declined)
      error: failed to push some refs to 'git.heroku.com/ecpredictor.git'

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@ReemTelbani Try it again...every time you try it you get a different error...which means you're doing something different than the video each time you try it.

  • @myportfolioresume1938
    @myportfolioresume1938 2 ปีที่แล้ว

    On buttonclick the url is redirecting to localhost/home

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Why did you code it to do that?

  • @tanaysukhdeve6284
    @tanaysukhdeve6284 4 ปีที่แล้ว

    [Solved]After git push heroku master...runs successfully but the url returns application error...plz help....
    ps:i dont have a virtual env ,i have done it globally in MyApp.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      What's the exact error?

    • @tanaysukhdeve6284
      @tanaysukhdeve6284 4 ปีที่แล้ว

      @@Codemycom 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
      LAST LINE OF LAST CMD RUN : remote: Verifying deploy... done.
      To git.heroku.com/tanaysblog.git
      * [new branch] master -> master
      LOG details :
      $ heroku logs --tail
      2020-10-03T14:56:03.862112+00:00 app[api]: Release v1 created by user hawasskpujari@gmail.com
      2020-10-03T14:56:03.862112+00:00 app[api]: Initial release by user hawasskpujari@gmail.com
      2020-10-03T14:56:04.018223+00:00 app[api]: Release v2 created by user hawasskpujari@gmail.com
      2020-10-03T14:56:04.018223+00:00 app[api]: Enable Logplex by user hawasskpujari@gmail.com
      2020-10-03T14:56:55.000000+00:00 app[api]: Build started by user hawasskpujari@gmail.com
      2020-10-03T14:57:29.103797+00:00 app[api]: Release v3 created by user hawasskpujari@gmail.com
      2020-10-03T14:57:29.103797+00:00 app[api]: Deploy a58d7b10 by user hawasskpujari@gmail.com
      2020-10-03T14:57:29.116297+00:00 app[api]: Scaled to web@1:Free by user hawasskpujari@gmail.com
      2020-10-03T14:57:33.422840+00:00 heroku[web.1]: Starting process with command `: gunicorn application:app`
      2020-10-03T14:57:35.864962+00:00 heroku[web.1]: Process exited with status 0
      2020-10-03T14:57:35.896065+00:00 heroku[web.1]: State changed from starting to crashed
      2020-10-03T14:57:35.898838+00:00 heroku[web.1]: State changed from crashed to starting
      2020-10-03T14:57:38.000000+00:00 app[api]: Build succeeded
      2020-10-03T14:57:40.099704+00:00 heroku[web.1]: Starting process with command `: gunicorn application:app`
      2020-10-03T14:57:43.681155+00:00 heroku[web.1]: Process exited with status 0
      2020-10-03T14:57:43.715340+00:00 heroku[web.1]: State changed from starting to crashed
      2020-10-03T14:58:05.147620+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tanaysblog.herokuapp.com request_id=ea23a7bf-8365-4b28-8d14-575d89ebd78e fwd="103.252.171.139" dyno= connect= service= status=503 bytes= protocol=https
      2020-10-03T14:58:06.170795+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=tanaysblog.herokuapp.com request_id=5ab17e4b-2a62-4fd9-9801-53bd2531f7f7 fwd="103.252.171.139" dyno= connect= service= status=503 bytes= protocol=https
      PS:Thanks for quick reply

    • @tanaysukhdeve6284
      @tanaysukhdeve6284 4 ปีที่แล้ว

      After searching for days....Finally ,got the solution.This was due to the improper spacing in Procfile. My site is live now.Thanks @codemy.com

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@tanaysukhdeve6284 Awesome! Glad you got it sorted out!

  • @hnfsrj
    @hnfsrj 4 ปีที่แล้ว +2

    Thank you! Is what i can say!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're very welcome!

    • @hnfsrj
      @hnfsrj 4 ปีที่แล้ว

      @@Codemycom Everything went fine and it even said it was successful but when i refreshed the page again at the end, i got a 404 error. It would be great if u make a tutorial on how to fix it.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@hnfsrj I mean, you just did something wrong...I couldn’t guess what..

    • @hnfsrj
      @hnfsrj 4 ปีที่แล้ว

      @@Codemycom Yeah i think you're right about that, I will just google it and stuff and hopefully get it right. Thanks again

  • @misterbristles
    @misterbristles 3 ปีที่แล้ว

    Very kewl Flask tutorial set John, it helped a lot. I do have a problem when uploading to heroku. Deploy was successful, however got an application error with a codeH=14 which indicates no dyno was running. So, I hopped back and used heroku ps:scale worker-1 --app myappname and got ! Couldn't find that process type (worker). So I seem to be a little stuck. Advice?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      No clue...try walking through the steps again, you may have just missed something

    • @akashuday7107
      @akashuday7107 2 ปีที่แล้ว

      did you get the solution?

  • @alishahrose2076
    @alishahrose2076 3 ปีที่แล้ว

    How should I do this for Gevent pywsgi

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Sorry, I don't know that...check it's docs

  • @hoanglamsub2417
    @hoanglamsub2417 3 ปีที่แล้ว

    at=error code=H14 desc="No web processes running" method=GET path="/"
    help me please

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Try pasting that error into google

    • @hoanglamsub2417
      @hoanglamsub2417 3 ปีที่แล้ว

      @@Codemycom i have tried and ... :))

    • @hoanglamsub2417
      @hoanglamsub2417 3 ปีที่แล้ว

      @@Codemycom thanks for rep me

  • @destinyjames6117
    @destinyjames6117 4 ปีที่แล้ว +1

    Note: Add a runtime.txt in the same folder as the requirements.txt, you can specify the python version you wish the server to have there
    Example: python-3.6.9

  • @arifmod
    @arifmod 2 ปีที่แล้ว

    Thank you. Deployed

  • @WaldoTheWombat
    @WaldoTheWombat 3 ปีที่แล้ว

    what about environment variables?

  • @vagdrak6575
    @vagdrak6575 3 ปีที่แล้ว

    thank you for this amazing tutorial!

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Welcome!

    • @vagdrak6575
      @vagdrak6575 3 ปีที่แล้ว

      @@Codemycom heroku resets the database every few hours.could you please make a video on how to solve that?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@vagdrak6575 No, you can't save images on heroku. You have to save them on a CDN.

    • @vagdrak6575
      @vagdrak6575 3 ปีที่แล้ว

      @@Codemycom i mean the friends database

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@vagdrak6575 Then no, it shouldn't be resetting anything

  • @cinthyavillegas5644
    @cinthyavillegas5644 3 ปีที่แล้ว

    Gracias a usted he podido salvar mi residencia profesional, THANK U A LOT

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      You're welcome!

  • @mlailpkcmlailpkc6312
    @mlailpkcmlailpkc6312 3 ปีที่แล้ว

    I love your tutorial. but please how do i serve staticfiles with whitenoise on heruko

  • @confymarlow
    @confymarlow 4 ปีที่แล้ว

    Herokou is 24/7 without my computer?

  • @BrooklynDesigne
    @BrooklynDesigne 3 ปีที่แล้ว

    Help me please! I have a mistake : Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/conda/feedstock_root/build_artifacts/babel_1605182336601/work'
    after "git push heroku master". (((

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      You're using anaconda..it's different than regular python

    • @BrooklynDesigne
      @BrooklynDesigne 3 ปีที่แล้ว

      @@Codemycom I’m crying..thank you so much!

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      @@BrooklynDesigne sure thing

  • @akramelomrani8728
    @akramelomrani8728 4 ปีที่แล้ว

    You are soo good man thank you very much

  • @matusb6638
    @matusb6638 3 ปีที่แล้ว

    Thank you for this video. It saved my sanity xD

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      Glad I could help

  • @cozyrain410
    @cozyrain410 4 ปีที่แล้ว +1

    Thank you so much

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      You're most welcome

  • @mvlogsyt3268
    @mvlogsyt3268 2 ปีที่แล้ว

    Got error that slug was too big. Please help

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Make it smaller

  • @mohamadosman9616
    @mohamadosman9616 3 ปีที่แล้ว

    Many thanks 💓💓💓

  • @mahiraasadzade8293
    @mahiraasadzade8293 2 ปีที่แล้ว

    Hi, thank you for great tutorial! I have such an error: "ERROR: Invalid requirement: 'git initFlask==2.1.2' (from line 1 of /tmp/build_d13d7f43/requirements.txt)" How can I solve it?(((

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      your requirements.txt file is wrong.

  • @mezianibelkacem650
    @mezianibelkacem650 4 ปีที่แล้ว

    it s perfect but in the end i get application error when i reload my page after push ! why ?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      what's the exact error?

    • @mezianibelkacem650
      @mezianibelkacem650 4 ปีที่แล้ว

      @@Codemycom when i run my application with pipenv it works and if i run my application with bash i get error in the code.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@mezianibelkacem650 well yeah, you have different setups you can expect different results

  • @kunalgaikwad7383
    @kunalgaikwad7383 2 ปีที่แล้ว

    Thank you👍👍

  • @Lily-ed2sc
    @Lily-ed2sc 3 ปีที่แล้ว

    this was straightforward however my requirements.txt file was having issues

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      no, it's not a thing that can really have issues...

  • @akhileshregmi3294
    @akhileshregmi3294 4 ปีที่แล้ว

    git commit -am 'initial commit'
    fatal: paths 'commit' ...' with -a does not make sense
    Help

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      huh?

    • @akhileshregmi3294
      @akhileshregmi3294 4 ปีที่แล้ว +1

      @@Codemycom had the same reaction....This is what comes when I do the thing: git commit -am 'initial commit'
      (I have screenie)

  • @zedrobot5864
    @zedrobot5864 3 ปีที่แล้ว +1

    it keep giving me response 404 ?????

    • @dustinjoosen5901
      @dustinjoosen5901 3 ปีที่แล้ว

      in that case your url is not correct

  • @BodrumDrone
    @BodrumDrone 3 ปีที่แล้ว

    cool mate this video so helpful

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad you liked it!

  • @anmolsingh4969
    @anmolsingh4969 4 ปีที่แล้ว

    How to push apache mysql data base

  • @ndanjikalokoni4575
    @ndanjikalokoni4575 4 ปีที่แล้ว

    how do i deploy a flask opencv apllication

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      I don't know what a flask opencv app is...

  • @bryarmustafa2294
    @bryarmustafa2294 3 ปีที่แล้ว +1

    The Younger version of the "Breaking Bad" star.

  • @devarshigoswami9149
    @devarshigoswami9149 3 ปีที่แล้ว

    in an alternate universe, Walter White taught programming instead of chemistry