RemDelaporteMathurin / h-transport-materials-dashboard

Dashboard for H transport properties
https://htm-dashboard-uan5l4xr6a-od.a.run.app
MIT License
11 stars 5 forks source link

End of Herokuapp free plan #73

Closed RemDelaporteMathurin closed 1 year ago

RemDelaporteMathurin commented 2 years ago

Herokuapp will end their free plan in about a month.

We need to either move to a paid plan or find some alternative.

Any ideas?

RemDelaporteMathurin commented 2 years ago

@shimwell you have many dash powered apps that don't run on Herokuapp, would you mind giving your opinion?

shimwell commented 2 years ago

I have used and still use two different options

google cloud build, this is hooked up to the git repo and when the git repo has a merge to main then the docker image containing the app is rebuilt on gcloud and hosted.

I also use zappa to deploy docker images to AWS. Tutorial here

RemDelaporteMathurin commented 2 years ago

google cloud build seems interesting! does it produce a URL too?

shimwell commented 2 years ago

you get a url like this one https://isotope-xs-plotter-4zf6u4tg6a-lz.a.run.app/ which you can then map to a domain like this one http://isotope-plotter.xsplot.com/

RemDelaporteMathurin commented 2 years ago

@shimwell I tried adding a Dockerfile on this branch

When running:

docker build -t htm_dashboard
docker run --network host -t htm_dashboard

It produces:

PS D:\Projets\h-transport-materials-dashboard> docker run --network host -t htm_dashboard
[2022-10-21 15:41:06 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2022-10-21 15:41:06 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2022-10-21 15:41:06 +0000] [1] [INFO] Using worker: gthread
[2022-10-21 15:41:06 +0000] [9] [INFO] Booting worker with pid: 9

But http://0.0.0.0:8080 displays nothing.

Any idea off the top of your head?

shimwell commented 2 years ago

hummm not sure, that all looks correct to me

RemDelaporteMathurin commented 2 years ago

Right, I have the same behaviour with isotope-xs-plotter

shimwell commented 2 years ago

how about the app.py

https://github.com/RemDelaporteMathurin/h-transport-materials-dashboard/pull/74

RemDelaporteMathurin commented 2 years ago

Maybe the port 8080 is blocked on Windows. I'll try with 8050

RemDelaporteMathurin commented 2 years ago

Nah same thing with 8050.

RemDelaporteMathurin commented 2 years ago

Ok, I think it's a windows issue: it works on google cloud services: https://htm-dashboard-uan5l4xr6a-od.a.run.app/

RemDelaporteMathurin commented 1 year ago

Closing this as the google cloud route seems to work fine. Next step: try to have a proper URL and not the hashed one that we currently have. Any idea @shimwell?

shimwell commented 1 year ago

I think the url provided by google cloud is stable and stays the same.

You could have a html hosted by github pages, this would provide a nicer url

The html could redirect like this

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="refresh" content="7; url='https://www.xsplot.com'" />
  </head>
</html>
RemDelaporteMathurin commented 1 year ago

That's a shout!!