Files
Promocode-API/solution
2025-01-26 12:10:21 +03:00
..
2025-01-26 12:09:36 +03:00
2025-01-26 11:33:03 +03:00
2025-01-26 12:10:21 +03:00
2025-01-19 19:02:41 +03:00
2025-01-19 19:02:41 +03:00
2025-01-19 19:02:41 +03:00
2025-01-19 19:02:41 +03:00
2025-01-24 22:52:04 +03:00
2025-01-19 19:02:41 +03:00
2025-01-19 19:02:41 +03:00

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 enviroment

cp .env.template .env

And setup env vars according to your needs.

Install dependencies

For dev enviroment
uv sync --all-extras
For prod enviroment
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 enviroment

Customize enviroment with docker run command (or bind .env file to container), for all enviroment 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.