Files
AdNova/solution/services/backend
2025-02-21 07:23:27 +03:00
..
2025-02-21 07:23:27 +03:00
2025-02-21 07:20:03 +03:00
2025-02-18 23:57:18 +03:00
2025-02-15 21:00:14 +03:00
2025-02-15 15:19:56 +03:00
2025-02-18 23:58:15 +03:00
2025-02-18 23:58:15 +03:00
2025-02-21 07:12:57 +03:00
2025-02-18 23:58:15 +03:00
2025-02-21 07:01:07 +03:00

AdNova Backend

Prerequisites

Ensure you have the following installed on your system:

Basic setup

Installation

Clone the project

git clone https://gitlab.prodcontest.ru/2025-final-projects-back/devitq.git

Go to the project directory

cd devitq/solution/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 https://gitlab.prodcontest.ru/2025-final-projects-back/devitq.git

Go to the project directory

cd devitq/solution/services/backend

Build docker image

docker build -t adnova-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 adnova-backend adnova-backend

Celery worker

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

Backend will be available on 127.0.0.1:8080.

Testing

Clone the project

git clone https://gitlab.prodcontest.ru/2025-final-projects-back/devitq.git

Go to the project directory

cd devitq/solution/services/backend

Install dependencies

uv sync --all-extras

Run tests

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

Check coverage

uv run coverage report