Files
DataRush/services/backend
2025-03-04 05:46:48 +03:00
..
2025-03-04 04:23:02 +03:00
2025-03-03 12:42:04 +03:00
2025-03-02 20:48:21 +03:00
2025-03-04 02:04:11 +03:00
2025-02-28 21:52:48 +03:00
2025-03-01 09:30:09 +03:00
2025-02-28 21:52:48 +03:00
2025-02-28 21:52:48 +03:00
2025-03-03 11:32:10 +03:00
2025-03-01 09:30:09 +03:00

DataRush Backend

Prerequisites

Ensure you have the following installed on your system:

Basic setup

Installation

Clone the project

git clone git@gitlab.prodcontest.ru:team-15/project.git

Go to the project directory

cd project/services/backend

Customize environment

cp .env.template .env

And setup env vars according to your needs.

Install dependencies

For dev environment
uv sync --all-extras
For prod environment
uv sync --no-dev

Running

Apply migrations
uv run python manage.py migrate
Start celery worker
celery -A config worker -l INFO
Start server

In dev mode:

uv run python manage.py runserver

In prod mode:

uv run gunicorn config.wsgi

Containerized setup

Clone the project

git clone git@gitlab.prodcontest.ru:team-15/project.git

Go to the project directory

cd project/services/backend

Build docker image

docker build -t datarush-backend .

Customize environment

Customize environment with docker run command (or bind .env file to container), for all environment vars and default values see .env.template.

Run docker image

Backend

docker run -p 8080:8080 --name datarush-backend datarush-backend

Celery worker

docker run --name datarush-celery-worker datarush-backend celery -A config worker -l INFO

Backend will be available on 127.0.0.1:8080.

Testing

Clone the project

git clone git@gitlab.prodcontest.ru:team-15/project.git

Go to the project directory

cd project/services/backend

Install dependencies

uv sync --all-extras

Run tests

uv run coverage run --source="." manage.py test

Check coverage

uv run coverage report