Attaching oTree(Django) to IIS with Windows VM using Hypercorn or equivalent?

216 views Asked by At

I have been looking into adding oTree to a website hosted in Windows 2012 IIS on a Windows 10 VM. To run locally I just run otree prodserver inside the directory of the apps folder. The app runs on localhost:8000 unless specified otherwise, which allows me to generate unique urls for players on the local network. When looking at attaching to the IIS so it can get ran using a URL on the cloud remotely, not sure how to go about it. With Django attaching the wsgi and enabling it to the IIS. Inside oTree no file exist. It seems to use Uvicorn and Scarlett to run asynchronously with ASGI server. From what I can tell it would be easiest to use Hypercorn and run it with a web.config file. But that's where I am lost. I'm not sure where the ASGI module/app is to execute with Hypercorn. Can I just run a CLI with otree prodserver and attach that to Hypercorn to host the localhost:8000 on the IIS with a proxy?

0

There are 0 answers