Skip to content

yakir3/jiracdflow

Repository files navigation

Python Django

Dependencies

Mysql

mkdir ./volume

docker run --name jiracdflow-mysql \
  -e MYSQL_ROOT_PASSWORD=123qwe \
  -e MYSQL_DATABASE=jiracdflow \
  -p 3307:3306 \
  -v $(pwd)/volume/mysql_data:/var/lib/mysql \
  -d mysql:5.7 --character-set-server=utf8mb4

Start project

Pip

# Create Virtualenv
python3 -m venv .venv


# Install denpendencies
python3 -m pip install pytest
python3 -m pip install -r requirements.txt


# Init db and config
python manage.py makemigrations
python manage.py migrate
#python manage.py collectstatic --noinput
mkdir ./logs ./static ./templates
cp config/config.yaml.default config/config.yaml


# Start for dev
source .venv/bin/activate
python manage.py runserver 0.0.0.0:8080


# Start for prod
source .venv/bin/activate
export PROJECT_ENV=prod
uwsgi --ini uwsgi.ini
uwsgi --reload uwsgi.pid
uwsgi --stop uwsgi.pid

Poetry

# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$PATH:/root/.local/bin"
#echo PATH="$PATH:/root/.local/bin" >> ~/.bashrc


# Create Virtualenv
poetry config virtualenvs.in-project true
poetry env use `which python3.12`


# Install denpencies
poetry add Django==4.1.3
poetry install


# Init db and config
python manage.py makemigrations
python manage.py migrate
#python manage.py collectstatic --noinput
mkdir ./logs ./static ./templates
cp config/config.yaml.default config/config.yaml


# Start for dev
poetry shell
python manage.py runserver 0.0.0.0:8080


# Start for prod
poetry shell
export PROJECT_ENV=prod
uwsgi --ini uwsgi.ini
uwsgi --reload logs/uwsgi.pid
uwsgi --stop logs/uwsgi.pid

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages