0

I'm developing a dashboard in Dash which I am trying to deploy it to Heroku. However most of the example available, the script which Heroku calls is at the repo root level. The following is my repo structure:

enter image description here

Ideally I would not want to change the repo strucutre and would like Heroku to pick up dashboard.py using something similar as follow:

web: gunicorn src/dashboard:server

However Herokue does not able to pick that up and return with error saying that it could not local where the module is.

How should I set up the Procfile?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Jonathan Chow
  • 1,207
  • 1
  • 9
  • 11

2 Answers2

0

If src is set up as a python module, ie there is a _int.py in the directory, dashboard.py will be available as a script within a module therefore you could set up the Procfile as follow:

web: gunicorn src.dashboard:server
Jonathan Chow
  • 1,207
  • 1
  • 9
  • 11
0

I'm not sure if this is what you want, but you can use cd, although you will have to implement it your self, or find an implementation. I really like this implementation.

Minek Po1
  • 142
  • 1
  • 9
  • I don't suppose you can use this implementation in the Procfile? Herokue start the script in a bash like environment and you could not implement something you suggested unless you are in the Python runtime environment. – Jonathan Chow Nov 26 '20 at 10:48