Installation with Docker
You will need:
A domain name pointed at the server you’re going to use. A subdomain (e.g.
numbas-lti.youruniversity.edu) is fine.
An SSL certificate: LTI content must be served over HTTPS. These can be obtained easily and for free from Let’s Encrypt.
These instructions will run the Numbas LTI provider inside a Docker container, along with containers for the services it requires.
Obtain the Docker compose recipe and its associated files either by downloading the latest release from GitHub, or by cloning the git repository:
git clone https://github.com/numbas/numbas-lti-provider-docker.git
Copy the file
settings.env and write your own values for each of the variables inside.
get_secret_key script to generate a value for the
SECRET_KEY environment variable, and put that in
docker-compose run --rm numbas-setup python ./get_secret_key
Obtain an SSL certificate and key for the domain you will access the Numbas LTI provider from.
Copy the key to
files/ssl/numbas-lti.key and the certificate to
Run the installation script, to set up the database and create the superuser account:
docker-compose run --rm numbas-setup python ./install
The LTI provider is ready to start.
Run the following command:
docker-compose up --scale daphne=4 --scale huey=2
You can customise the number of each of the kinds of process by changing the numbers in the –scale arguments. You’ll have to establish how many of each you need by experimentation. The daphne process handles web requests; you will need more if you have lots of simultaneous connections. The huey process runs asynchronous tasks; you will need more if you find that tasks such as reporting scores or generating report files take a very long time.
Stop the containers with:
This does not delete any permanent data such as the database, settings file or uploaded files.
First, update the files in the Docker repository. If you used git, run:
Upgrade to a new version of the Numbas LTI provider with the following commands:
docker-compose build --no-cache numbas-setup docker-compose build --no-cache daphne docker-compose build --no-cache huey docker-compose run --rm numbas-setup python ./install docker-compose restart
Occasionally there are other changes that must be made; check the upgrade instructions for the version you are upgrading to.