Skip to content

63phc/lks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version 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 Deploying

Deploy to DO

Project Contents

Project Code

CodeFactor codebeat badge Codacy Badge BCH compliance codecov CodeScene System Mastery

Project Structure

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

Project Technology

GitHub GitHub GitHub

Project Features

  • Versioning
  • Support multilingual
  • CI/CD with github actions
  • Auto posting FB, INST, VK
  • Watermarks photo
  • 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
EMAIL_HOST
EMAIL_PORT 587
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
SENDGRID_API_KEY
MAILGUN_API_KEY
FIXER_ACCESS_KEY
OPEN_EXCHANGE_RATES_APP_ID
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.