Developer installation

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.

Requirements

  • The quickstart procedure requires Docker and Docker Compose v2 (i.e. docker compose should work, without a dash), 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:
  • uv — Python package and project manager. uv manages the Python version automatically, so no separate Python installation is required.
  • Git

Getting Started

  1. Install uv. Follow the uv installation instructions for your platform.

  2. Download Thunor Web. Change directory to where you want to download the software, then type:

    git clone https://github.com/alubbock/thunor-web
    cd thunor-web
    
  3. Run the Thunor Web initialization script. This installs Python and all dependencies automatically.

    uv run python thunorbld.py init
    
  4. Create an admin account. You can use this to log in.

    uv run python manage.py createsuperuser
    
  5. Start the development server

    uv run 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.

  1. Stop the development server if it's running, by pressing Ctrl+C
  2. Shut down the database by running docker compose down in the thunor-web directory.

Re-start Thunor Web at a later date

To re-start Thunor Web at a later date:

  1. Change directory to the thunor-web installation location
  2. Make sure the database is started: docker compose up -d
  3. Start the development server: uv run python manage.py runserver

Uninstallation

Simply shutdown the system as above, then delete the thunor-web directory (noting that this will delete all data in Thunor Web, of course).

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 thunor-dev.env file.

Making modifications

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 build:

uv run python thunorbld.py --dev makestatic

Unit tests

To run the unit test suite on the host machine's Python environment:

uv run 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

uv run python thunorbld.py test