Is it possible to Host an anvil app in Heroku?

370 Views Asked by At

I'm trying to deploy my anvil (web)app on Heroku...I don't know if it is possible or not.

so if it is possible then how do I configure my Procfile? How it should look like? and what more do I need?

after posting this question I've tried myself

Procfile

web: python hss.py
worker: python hss.py  

after starting the deployment I got this error

File "/app/hssssss/hss.py", line 20, in <module>
 import anvil.server
 class LiveObjectProxy(anvil.LiveObject):
AttributeError: module 'anvil' has no attribute 'LiveObject'
1

There are 1 best solutions below

3
liguepk On BEST ANSWER

I don't know if there is a buildpack for anvil with heroku, but if there isn't then you can deploy on heroku with docker. You just have to provide a Dockerfile and a file called heroku.yml, then heroku will build the docker container for you.

Here are some links to help you with this :

https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

https://github.com/anvilproject/anvil-docker

https://anvil.works/articles/jupyter-docker-and-anvil