- 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.
applications:
account +
api +
blog +
comments +
reactions +
contacts +
courses -
dashboard -
feed -
menu +
reviews +
shop +
order +
product +
delivery -
shorter -
slider +
subscribe +
notification -
in app -
email -
- Python (docs, hub.docker)
- Django (docs)
- DRF (docs)
- Celery (docs)
- Swagger (docs)
- Redis (docs, hub.docker)
- PostgreSQL (docs, hub.docker)
- Nginx (hub.docker, hub.docker)
- Docker (docs)
- Docker compose (docs)
- GraphQL (docs)
- Support multilingual
- CI/CD with github actions
- Auto posting FB, INST, VK
- Async views for graphQL
- ... be sure to add features ...
- 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
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
- .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 |
- 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
- Pycharm Setup: https://www.jetbrains.com/help/pycharm/docker.html
- If you find any bugs, feel free to file an issue on the github issue tracker.