Part of sleepwalker project. Django powered backend for sleep monitoring and sleepwalking detection + prevention system.
- Django 4.2
- django rest framework 3.14
- gunicorn
- celery
- swagger (drf-spectacular)
- Token and ApiKey based authentication.
- Heart beat monitoring and sleepwalking detection.
- Configurable detection parameters (user settings).
- Create
.env
file
cp .env.template .env
- Run dev docker services.
sudo docker compose -f docker-compose-dev.yml up
- Run celery workers
sh scripts/celery_entrypoint.sh
- Create
.env
file
cp .env.template .env
- Change config values
DEBUG
- set to 0DB_PATH
- database pathLOGS_PATH
- logs pathALLOWED_HOSTS
- comma separated host namesPOSTGRES_USER
- database userPOSTGRES_PASSWORD
- password for database
- Run docker services.
sudo docker compose up -d
- Bash into web app container.
sudo docker container exec -it sleepwalker_backend bash
- Run accounts manager cli
python3 manage.py create_user
.
swagger documentation can be found (only DEBUG
mode)
/api/docs
python3 manage.py test