Jonnie Grieve Digital Media: Blog

Home
by on 21st May, 2021 - 5:11pm (0)

Blog: R7D24: #100DaysOfCode (More Posts)

A major win for me this morning was successfully deploying this app to Heroku.  This was a much more difficult process for me than it really needed to be.  The support and the information was out there and it truth it was probably ready sooner than I realised, if only I was able to properly interpret the Heroku logs.

The main takeaways for me are:

  • Gunicorn is okay for windows – There appeared to be some confusion in my research about this important component in Heroku is actually compatable with Windows users. At one point, I made the (incorrect assumption it seems) that I’d have to look for another way to deploy a Flask app to Heroku.  But there it appeared in my requirements list via the pip freeze command.  And there it appeared in the Heroku tail logs.
  • web: gunicorn app:app – This leads me on to my next point.  I think there are a number of web process to use in the Heroku Procfile’s but it does seem
  • switch off debugging for local server development – This it turned out was the killer and really it should have been obvious to me from the beginning that if I’m going to deploy something to a production server I should have either removed this code completely or commented it out so Python would ignore it. It makes sense to me now because one thing I did keep seeing in the logs was “build succeeded” before showing more errors that caused a crash. But before the crash something had clearly worked.  It makes sense to me now that I’d done enough to successfully deploy the app, but I’d done something else that then caused the app to crash and therefore to not display.

Luckily for me I’m a persistent so and so. 🙂

Photo Instructional v1

So what do I want this application to me?   Right now as of this date it’s a kind of amalgamation of some test routes I’ve done to make sure the workspace can be deployed and the website it is going to become, which is a photography instructional site.  A nice little site of no more than 3 or 4 routes you can scroll through, view a collection of photos and the metrics you need from your DSLR camera to re-create it.  It seemed like an excellent reason to make a Flask Python site.

I’m looking forward to sharing the final result with you all.

Related Links

This post has been assigned to the following categories

    Leave a Reply

    Your email address will not be published. Required fields are marked *