Skip to content

littleknitsstory/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tests build GitHub

LITTLE KNITS STORY

swagger graphql

- This is project with the most modern technologies, also for testing new version of python and django.
- This is just a pet project backend, this is not a boxed solution, this is just an API for my project.
- The project that underlies this repository is coming out of deep beta and the production version of the product 1.0.0 is being prepared.
- So the master branch can be used however you like.
- There is a lot of experimental stuff in the development branch.

Project Contents

Project Code

CodeFactor codebeat badge Codacy Badge BCH compliance codecov CodeScene System Mastery

Project Structure

applications:
    account       + 
    api           + 
    blog          +
      comments    +
      reactions   + 
    contacts      + 
    courses       - 
    dashboard     - 
    feed          -
    menu          + 
    reviews       + 
    shop          +
      order       +
      product     +
      delivery    -
    shorter       -
    slider        + 
    subscribe     + 
    notification  - 
      in app      - 
      email       -

Project Technology

GitHub GitHub GitHub

Project Features

  • Support multilingual
  • CI/CD with github actions
  • Auto posting FB, INST, VK
  • Async views for graphQL
  • ... be sure to add features ...

Project Install

  • Clone project:
        git clone -b develop https://github.com/63phc/lks.git
  • There are two ways to start a project, all in docker or only pg, redis in docker
  • You can not use docker, then you should have pg and redis in local

Start for developing locale with postgres, redis in docker

   cp .env.example .env
   # all 
   docker-compose -f .docker/docker-compose.local.yml up --build --quiet-pull
   # postgresql redis
   docker-compose -f .docker/docker-compose.local.yml up postgresql redis
  • Create virtual env:
    python3 -m venv Venv
    source Venv/bin/activate
    pip3 install -r src/requirements/development.txt
  • Prepare project:
    python manage.py makemigrations
    python manage.py migrate
    python manage.py collectstatic
    python manage.py createsuperuser
    python manage.py loaddata src/fixtures/*.json
    python manage.py runserver

    gunicorn src.core.wsgi:application -w 2 -b 0.0.0.0:8000
    gunicorn src.core.asgi:application -k uvicorn.workers.UvicornWorker

Parameters

  • .env file:
Environment Default Description
SECRET_KEY
ENVIRONMENT test test using sqlite
NGINX_PORT 26363
POSTGRES_NAME lks_pg_name
POSTGRES_USER lks_pg_user
POSTGRES_DB lks_pg_db
POSTGRES_PASSWORD lks_pg_pass
PGDATA /var/lib/postgresql/data/pgdata
POSTGRES_HOST localhost
POSTGRES_PORT 5432
REDIS_HOST localhost
REDIS_PASSWORD pswd123
REDIS_PORT 6379
FLOWER_PORT 9876
FLOWER_USER admin
FLOWER_PASSWORD admin
PROVIDER_EMAIL
SENTRY_DNS

Start in Docker

  • Install Docker: instructions
  • edit .docker/dev/.env file with your params:
        cp .env.example .docker/.env
        docker-compose -f .docker/docker-compose.yml build
        docker-compose -f .docker/docker-compose.yml up
        #
        docker-compose -f .docker/docker-compose.yml run backend python manage.py makemigrations
        docker-compose -f .docker/docker-compose.yml run backend python manage.py migrate
        docker-compose -f .docker/docker-compose.yml run backend python manage.py loaddata src/fixtures/*.json

Project Issues TODOs

  • If you find any bugs, feel free to file an issue on the github issue tracker.