Run the development version¶
These are the steps to run Mandarin in development mode.
Start PostgreSQL¶
The PostgreSQL server must be running before starting Mandarin.
On systemd-based systems, you can start it with the following command:
systemctl start postgresql
You can check the status of the PostgreSQL server with status and journalctl:
systemctl status postgresql
journalctl -u postgresql
Start Redis¶
The Redis server must be running before starting Mandarin.
On systemd-based systems, you can start it with the following command:
systemctl start redis
You can check the status of the Redis server with status and journalctl:
systemctl status redis
journalctl -u postgresql
Start Celery¶
The various processes of Mandarin use Celery to run various long tasks, such as the processing of song metadata.
As a first thing, you’ll have to start the Celery development server:
poetry run python -m celery -A mandarin.taskbus.__main__ worker --loglevel=DEBUG
Warning
The IntelliJ/PyCharm debugger does not currently work with Celery tasks.
Start the web API¶
You can start Mandarin’s debug web API with the following command:
poetry run python -m mandarin.webapi.apps.debug
If you didn’t change the ports in the config file, the web API will be accessible at 127.0.0.1:30009, and the
autogenerated specification will be available at:
/openapi.json <http://127.0.0.1:30009/openapi.json> in OpenAPI format.
If you’re using the demo authentication database, you should be able to authorize yourself by using:
Client ID:
IJ2VcIYHVkKVpIy02lxr2rMGBibDKuKMClient Secret:
oZMm8p2RWGezMDCYYDqI2VbYOT6-tJ62n0wnFksvREC8kQXI55BbEEcsccV3SmaWUsername:
demo@steffo.euPassword:
MONOCULUS!123