Deploy dash to github pages

Hi I was doing some research on Dash and other frameworks that could help be create single page dashboards. With Dash it wasnt clear to me whether or not you could deploy dash based web apps to github pages. I understand Dash is built on flask, so would it be as simple as it states in the Dash tutorial on deployment for accessing flask directly, then possibly generate the static pages with freeze-flask?

I have never used flask or dash, so I just wanted to make sure this was possible before I spend too much time spinning my wheels on something that is not possible.

Thanks!

1 Like

This isn’t possible right now, as Dash’s JS front-end renders the content on the page, not flask. This will be possible in the future when we have dash clientside: Clientside Callbacks · Issue #266 · plotly/dash · GitHub

2 Likes

@chriddyp Thanks for the info. I took a look at the issue. This update looks really great! How close is it until it will be released?

Hi @chriddyp Do you have any update on how to host dash apps as github pages. I can see that the issue mentioned above is closed https://github.com/plotly/dash/issues/266 .

Could you please share a github repo for reference, to host dash app as github page.

Hi @Sachin_Dev_Sharma

See in this link:

https://dash.plotly.com/deployment

Hi @Eduardo Thanks for the response. But this is not what I’m looking for.

I want to host a static app as github page mentioned here from the repo(https://username/username.github.io)

Hope I was clear in explaining my problem.

It is not possible, you need a Flask backend.

1 Like

As @chriddyp said, this is now possible with clientside dash. Most dash apps need a Flask server as callbacks are by default serverside. If all your callbacks are clientside though, you don’t need a Flask server and can use hosting services like GitHub Pages that only support static sites. Here is an example: GitHub - covid19-dash/covid-dashboard: Help welcomed if you have expertise in public health web technology, data modeling and munging, or visualization.. Seems like there is some extra work in a makefile to generate all the static files of your dash app so that GitHub Pages serves them correctly.

1 Like

Hi @chriddyp @amarv Can we have a “how to doc” for hosting static dash apps on github pages, as now heroku has removed the free tier support. That will be a great help to all visiting the page in the future.

I’d love to learn “how to deploy static dash apps on github pages”, too.

Any advice?

I’ve created a short (but hopefully comprehensive) tutorial on how to deploy and host static Dash apps: GitHub - dec0dedd/dash-actions-tutorial

Hope it helps! Feel free to message me if you have any questions.

2 Likes