diff --git a/.env.example b/.env.example index 13e8e71d..57d789f9 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,10 @@ -DEBUG= -DJANGO_SECRET_KEY= +DEBUG=True +DJANGO_SECRET_KEY=examplekey EMAIL_USER= EMAIL_PASSWORD= -EMAIL_HOST= -EMAIL_PORT= +EMAIL_HOST=1 +EMAIL_PORT=1 SENTRY_DSN= @@ -14,7 +14,7 @@ DATABASE_PASSWORD= DATABASE_HOST= DATABASE_PORT= -SELECTEL_ACCOUNT_ID= +SELECTEL_ACCOUNT_ID=-1 SELECTEL_CONTAINER_NAME= SELECTEL_CONTAINER_PASSWORD= SELECTEL_CONTAINER_USERNAME= @@ -26,4 +26,4 @@ TELEGRAM_BOT_TOKEN= TELEGRAM_CHANNEL= CLICKUP_API_TOKEN= -CLICKUP_SPACE_ID= +CLICKUP_SPACE_ID=-1 \ No newline at end of file diff --git a/.github/workflows/django-test.yml b/.github/workflows/django-test.yml index 4514720d..d72dd1bd 100644 --- a/.github/workflows/django-test.yml +++ b/.github/workflows/django-test.yml @@ -19,7 +19,7 @@ jobs: python-version: 3.11 - name: cache poetry install - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.local key: poetry-1.2.2-0 @@ -32,7 +32,7 @@ jobs: - name: cache deps id: cache-deps - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: .venv key: pydeps-${{ hashFiles('**/poetry.lock') }} @@ -46,4 +46,4 @@ jobs: - name: Run tests run: poetry run python manage.py test env: - DEBUG: True \ No newline at end of file + DEBUG: True diff --git a/Dockerfile b/Dockerfile index 516d3605..3d4c13c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM python:3.11 RUN apt update --no-install-recommends -y +RUN apt install -y cmake +RUN rm -rf /var/lib/apt/lists/* ENV PYTHONFAULTHANDLER=1 \ PYTHONUNBUFFERED=1 \ diff --git a/Makefile b/Makefile index 5832d918..d5c5a99f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ up: docker compose -f docker-compose.yml up -d down: - docker compose -f docker-compose.yml down \ No newline at end of file + docker compose -f docker-compose.yml down +build: + docker compose -f docker-compose.yml build \ No newline at end of file diff --git a/README.md b/README.md index eb72a4de..c554a2a6 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,11 @@ 🔑 Copy `.env.example` to `.env` and change api settings ### Install dependencies - -* 🐍 Install poetry with command `pip install poetry` +Before installing dependencies, make sure that you have python 3.11 (see the recommendations section below) + +* 🐍 Install poetry with command `pip install poetry==1.2.2` * 📎 Install dependencies with command `poetry install` +* 🐚 Активируйте виртуальное окружение: `poetry shell` ### Accept migrations @@ -22,6 +24,77 @@ ### Run project 🚀 Run project via `python manage.py runserver` + +### Run project in docker + +You can run project in docker with commands from Makefile (e.g. `make up`) + +## Recommendations + +### 1.Installing Pyenv + +Clone Pyenv from the official GitHub repository: + +```zsh +curl https://pyenv.run | bash +``` + +Add Pyenv to your shell profile (e.g., .bashrc, .bash_profile, or .zshrc): + +```zsh +export PATH="$HOME/.pyenv/bin:$PATH"eval "$(pyenv init --path)" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" +``` + +Apply changes to your shell environment: + +```zsh +source ~/.bashrc # or equivalent profile, e.g., for Zsh use .zshrc +``` + +Verify Pyenv is installed correctly: + +pyenv --version + +### 2. Installing Python 3.11 + +Once Pyenv is set up, you can install Python 3.11 with the following steps: + +Install Python 3.11: + +```zsh +pyenv install 3.11 +``` + +Verify Python 3.11 has been installed: + +pyenv versions + +### 3. Setting Python 3.11 as the Default Version + +To set Python 3.11 as the default global version, use the following command: + +```zsh +pyenv local 3.11 +``` + +This will switch your system's Python interpreter to use Python 3.11 by default. + +### 4. Verification + +Check that Python 3.11 is now the active version: + +```zsh +python --version +``` + +You should see: + +```zsh +Python 3.11.0 +``` + ## For developers ### Install pre-commit hooks diff --git a/docker-compose.yml b/docker-compose.yml index 0bbeda3c..998a7b73 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: command: bash ./scripts/startup.sh volumes: - ./log:/procollab/log + - ./:/procollab/. env_file: - .env environment: