You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-05-22 20:57:11 +00:00
9865480060
changed timezone for active status to utc+3
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.