Hi,
I want to deploy my bokeh app to heroku. But I am confused on
Procfile.
I have a template, so I need to deploy related directory (chorop)
my Procfile:
‘’’
web: bokeh serve --port=$PORT --allow-websocket-origin=chorop.herokuapp.com --address=0.0.0.0 - -use-xheaders chorop # (my dir)
‘’’
How can I deploy a directory to heroku ?
regards
The statement in the Heroku Procfile uses the syntax of bokeh for everything after web:
I think you’re running bokeh with static resources and such that require a directory structure. Correct? If so you just need to follow the requirements of the bokeh server and have a main.py file in your directory (chorop) that bokeh expects.
Okay. If something is not working as expected, then Heroku build or deployment logs for the app will be needed to help further.
In general, you need the Procfile, a requirements.txt file that specifies the Python packages to include, and these both reside at the same level as your bokeh directory. Also, I assume that you’ve registered the app as chorop based on the web address specified in your Procfile, i.e. chorop.herokuapp.com.
Yes. I have deployed apps to Heroku with a directory structure containing main.py. (I actually used panel, but since the panel server is the bokeh server, I expect that to work similarly.)
Your Procfile and requirements.txt file should be at the same level as the directory containing bokeh, i.e. they should not be in the application directory.