1

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'
Abdulla Shafi
  • 53
  • 1
  • 8

1 Answers1

2

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

liguepk
  • 191
  • 6
  • 1
    no ! there is no buildpack for the anvil. So I choose python (as buldpack ) and I deployed my app successfully. Now the problem is it saying there is some internal errors like **AttributeError: module 'anvil' has no attribute 'LiveObject** though this problem wasn't on my PC, it's happening after deployment. I will try with docker now and let you know – Abdulla Shafi Mar 30 '22 at 18:07
  • 1
    I'm getting the same error in docker also **AttributeError: module 'anvil' has no attribute 'LiveObject'** I don't know how to get rid of it. so please help me. any help would be appreciated. – Abdulla Shafi Mar 30 '22 at 19:27
  • 2
    If you installed anvil correctly in your Dockerfile, then I'm afraid this is an issue with anvil, which I can't help you with since I don't know anvil. – liguepk Mar 30 '22 at 20:21