Forums

Deploy more complex flask structure (setup.py structure)

Hi,

I'm trying to deploy a webapp which I created using the structure proposed by flask: http://flask.pocoo.org/docs/1.0/patterns/packages/

My code resides here: https://github.com/Zethson/dark-proteome-visualization

When running the app locally, I would install it with the setup.py before and then just start it and it works fine. However when deploying I run into several issues. Pythonanywhere seems to expect a single python file, where the flask app is defined. So I thought about pointing in the WSGI file to the app.py file here:

https://github.com/Zethson/dark-proteome-visualization/blob/development/dark_proteome_visualization/app.py

However, this does of course not run, as there are circular imports. This is pointed out in the flask tutorial, but is fine, if a setup.py file is used.

I would appreciate step by step instructions on how to deploy the website (it's MIT licensed, you can try out for yourself and see if you can get it running). As I'm planning on upgrading and hosting multiple sites here your efforts are not in vain.