Local run
Quickstart (with Docker)
-
Clone the repo
git clone git@github.com:NUTtech/Kesha.git cd Kesha
-
Build or download the docker image
for buildmake build
for download
docker pull nextuptechnologies/kesha:latest
-
Apply migrations and create a superuser:
make shell # inside the container python manage.py migrate # apply migrations python manage.py createsuperuser # create a superuser exit ## leave from the container
-
Start the app and its dependencies
make runserver
-
You will be able to access the service at
http://127.0.0.1:8042/
Start the project for development without Docker
-
Clone the repo and go to the project directory
git clone git@github.com:NUTtech/Kesha.git cd Kesha
-
Install dependencies
poetry install
-
Start databases
You can start databases in any other way# start postgres docker run \ --name postgres \ -d \ --rm \ -e POSTGRES_PASSWORD=kesha \ -e POSTGRES_USER=kesha \ --network host \ -v kesha_db:/var/lib/postgresql/data \ postgres # start redis docker run \ --name redis \ -d \ --rm \ --network host \ redis
-
Setting required environment variables
export KESHA_DB_HOST=127.0.0.1 export KESHA_SECRET_KEY=NO_SECRET export KESHA_CELERY_BROKER_URL=redis://127.0.0.1
Alternatively, you can create a local
.env
file with the variables -
Build static
poetry run python manage.py collectstatic --no-input
-
Apply database migrations
poetry run python manage.py migrate
-
Create a django superuser
poetry run python manage.py createsuperuser
-
Start the django app
poetry run python manage.py runserver
-
Start the celery worker
Run in a separate terminal windowpoetry run celery -A kesha worker -l INFO -c 4