OppiaMobile Community

Testing out server v0.12.0

Hi all,
As we’re getting close to completing the updates for Python 3 and Django 2 (which will be released in the next server version v0.12.0), I thought I’d put up some notes on how this can be tested out.

If you’re just running a test server on your laptop/desktop then there shouldn’t be any problems just following the upgrade process described here: https://oppiamobile.readthedocs.io/en/latest/technical/releases/server/upgrading/to_0_12_0.html

However, if you are running a staging server, especially one that runs on the same instance of Apache webserver as your live server, you will run into issues being able to run v0.12.0 as the staging server and any pre-v0.12.0 as live. This is because you can only run one python module version loaded with Apache, so you cannot run python v2.x and python v3.x at the same time.

Fortunately there are a few ways around this (from easiest to setup to more complex):

  1. Use the built in django webserver as a background process on a different port number (eg 8000). The django webserver is not recommended for use in production environments (see: https://stackoverflow.com/questions/4867793/using-djangos-built-in-web-server-in-a-production-environment) , but as a test/staging server for a limited time it might be OK - just be aware of the limitations described in the StackOverflow question.
  2. Set up another server instance (eg on AWS) to run the staging server from.
  3. Run the staging server under a different webserver (eg Nginx)

Probably there may be other options too, but these are just the ones that first come to my mind.