The developer installation allows the user to edit the Thunor Web source code, and is intended for use by those wishing to customize, develop, or contribute to the Thunor Web software. It is NOT a secure configuration to run across a network, and should not be run on a publicly accessible server. For that, see full installation, which is simpler to get up and running and recommended for most users.
This installation uses Python directly on your computer (i.e. not in a Docker container), Django's built in webserver, and a PostgreSQL database. Some Python/Django experience is recommended.
- The quickstart procedure requires Docker and Docker Compose (version 1.12 or later), which are used to launch a PostgreSQL database server. Advanced users may prefer to install their own PostgreSQL server or utilize an existing one instead. To use PostgreSQL in a Docker container, install one of the following:
- A Python >= 3.6 installation. If you have not used Python before, we recommend installing Anaconda.
- Git. If you're not sure if you have git, it will be provided with the Anaconda download in the previous step.
Create a virtual environment. This allows Thunor Web to keep its Python dependencies separate from other programs on your machine. You can do this with Anaconda (described here), or with
pyenv, if you prefer. On Anaconda, to create an environment called
thunorand activate it, run the following:
conda create -n thunor pip python=3.6 conda activate thunor
Download Thunor Web. Change directory to where you want to download the software, then type:
git clone --recurse-submodules https://github.com/alubbock/thunor-web cd thunor-web
Run the Thunor Web initialization script
python thunorbld.py init
Create an admin account. You can use this to log in.
python manage.py createsuperuser
Start the development server
python manage.py runserver
That's it! You can now access Thunor Web on your local machine by accessing http://localhost:8000 through a web browser.
Shut down the system
When you're done with testing, you can shut down the system as follows.
- Stop the development server if it's running, by pressing Ctrl+C
- Shut down the database by running
docker-compose downin the
Re-start Thunor Web at a later date
To re-start Thunor Web at a later date:
- Activate the virtual environment:
conda activate thunor
- Change directory to the
- Make sure the database is started:
docker-compose up -d
- Start the development server:
python manage.py runserver
Simply shutdown the system as above, then delete the
thunor-web directory (noting that this will
delete all data in Thunor Web, of course). If you're using Anaconda, you can deactivate the virtual
conda deactivate and delete it with
conda env remove -n thunor.
Further configuration options
For more configuration options that can be set as environment variables, see
configuration options. You can set those environment
variables in the
Changes to Python files should be reloaded automatically by the development server. If changing any
static files (within
thunorweb/webpack/thunorweb), you'll need to trigger a webpack
python thunorbld.py --dev makestatic
To run the unit test suite on the host machine's Python environment:
python thunorbld.py --dev test
Generally, the above test suite is sufficient, but to run the test suite in a Docker container (to mimic the production environment), run
python thunorbld.py test