Controller is a Django web app for Bustimes-based bus alerts. It uses rule cards to monitor a selected operator's fleet, vehicle types, liveries, fuel, routes, newly-added inventory, and changed records.
- Copy
.env.exampleto.envand set a strongDJANGO_SECRET_KEY. SetDJANGO_ALLOWED_HOSTSto the domains or LAN IP addresses that will access Controller (for example192.168.1.106,localhost). - Start the app:
docker compose up --build -d. - Create the first account:
docker compose exec web python manage.py createsuperuser. - Import the full Bustimes catalogue:
docker compose exec web python manage.py import_bustimes. - Open
http://localhost:8417and sign in.
The web UI listens on port 8417. The monitor service discovers active-rule operators automatically, polls vehicles.json every two minutes, and refreshes fleet and services every ten minutes.
Static assets are served by WhiteNoise directly from the Django container, so no separate web server is required.
When no .env value is supplied, Docker permits localhost, 127.0.0.1, and the current LAN address (192.168.1.106). Set DJANGO_ALLOWED_HOSTS explicitly if your LAN address changes or before exposing Controller beyond a trusted network.
Install dependencies with python -m pip install -r requirements.txt, then run python manage.py migrate, python manage.py createsuperuser, and python manage.py runserver 8417.
The /admin/ interface manages users. Each rule may post to a Discord webhook as well as creating website activity records.