Files
Promocode-API/solution

PROD 2 Stage

Prerequisites

Ensure you have the following installed on your system:

Basic setup

Installation

Clone the project

git clone https://github.com/Central-University-IT/test-2025-python-devitq

Go to the project directory

cd test-2025-python-devitq/solution

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

In dev mode

Apply migrations:

uv run python manage.py migrate

Start project:

uv run python manage.py runserver
In prod mode

Apply migrations:

uv run python manage.py migrate

Start project:

uv run gunicorn config.wsgi

Containerized setup

Clone the project

git clone https://github.com/Central-University-IT/test-2025-python-devitq

Go to the project directory

cd test-2025-python-devitq/solution

Build docker image

docker build -t prod-2-devitq .

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

docker run -p 8080:8080 --name prod-2-devitq prod-2-devitq

Backend will be available on localhost:8080.