oTree Forum >

oTree on Google App Engine (GAE)

#1 by yshimod

Salesforce has announced that it will no longer offer free usage slots on Heroku.
As a result, we may no longer have a reason to choose Heroku.

I am considering using Google App Engine (GAE) as an alternative.
Please let me know if you know how to deploy an oTree app with GAE.
I expect I need to set "otree prodserver" as the "entrypoint" in app.yaml, but it seems difficult to configure for Postgres.

#2 by Chris_oTree ,

Hi, although it's worth considering GAE, keep in mind that next month Heroku will make announcements about free Heroku resources available to academic users (it was mentioned in today's announcement). Another possibility is that due to the many Heroku users protesting this change, Heroku might change/delay/scale back their plans, etc. Personally I am taking a "wait and see" approach.

#3 by yshimod

Thank you for your reply.

>free Heroku resources available to academic users (it was mentioned in today's announcement)
I had missed this comment.

However, it may be worthwhile to consider using GAE (not in a hurry), as it seems important to have other options besides Heroku.


#4 by yshimod

If we move over from Heroku, render.com may be much better than GAE.
I have successfully deployed it effortlessly with render.com.

#5 by jkupb


Can you share your experience with render? What is different from heroku?

#6 by yshimod ,


I have not yet used Render.com for my research, so I don't have enough experience with it.

I used to charge Heroku when conducting experiments for my research, and I will also charge Render.com for data collection.
Comparing the billing menus, Render.com has a more segmented pricing menu.
For non-commercial users, unless we conduct a large-scale experiment, limited service is enough.
Render.com's segmented pricing allows us at a lower cost.

Deployment operations seem to be similar to Heroku.

We can choose the server location from Singapore as well as US and Germany.
Having a choice of Singapore is an advantage for me living in Japan.

Short instructions on how to deploy
(1) Upload (push) the oTree project to your GitHub repository.
E.g., https://github.com/yshimod/otree_survey
Procfile and runtime.txt are not needed for Render.com, although they are needed for deployment on Heroku.
On the other hand, requirements.txt is required for Render.com.
(2) (Optional) Create a PostgreSQL instance in advance on Render.com and copy the "Internan Database URL".
(3) Create a new "Web Service" on Render.com, connect your GitHub account to Render.com, and select your repository.
(4) Set up your deployment as follows:
- Environment: "Python 3"
- Build Command: "pip install -r requirements.txt"
- Start Command: "otree prodserver"
- Advanced -> environment variables:
    - PYTHON_VERSION: "3.9.13" (for example)
    - OTREE_ADMIN_PASSWORD: "yourpassword"
    - DATABASE_URL: "postgres://**********" (the URL string you memorized in step (2))
(5) Click the "Create Web Service" button to start deployment.
Comparing Render.com's free plan with Heroku's, you can feel that Render.com takes longer.

#7 by jkupb

Thanks a lot @yshimod I will save your post for later.

In case that Heroku does not offer a good solution for students / researchers I think that the oTree documentation should include alternatives like this @Chris_oTree

#8 by Victor ,

I think it's great to have other solutions besides Heroku. I do have a note for European researchers. The most critical factor for them will be what their academic institution prefers. In many cases, those institutions will have data protection agreements (DPA) with a third party in place or they will have server capacity for you in-house. It is quite critical to check with your IT department and data protection officer to see what they cleared if you are in Europe.

In some cases, your institution will be flexible enough to set up a new DPA for you. My institution successfully set one up with Salesforce, the company behind Heroku (somewhat to my surprise because it is a US company). Together with the DPA, they also set up a "heroku enterprise account," including dedicated groups for the different departments here. I wrote about it here: https://www.otreehub.com/forum/127/.

Write a reply

Set forum username