Giter Club home page Giter Club logo

cxbootcamp_be_premier_watcher's Introduction

Premier Watcher

Project scope

Application example of COAX Python Bootcamp project explained in lectures.

Environment

Link to the example of environments

Runtime environment

The infrastructure of Optinet project consists of the following services:

  • Premier Watcher project application (monolith)
  • PostgreSQL database
  • Celery
  • Redis
  • Docker
  • ElasticSearch
  • SMTP for mails

Commands

# Run non-applied migrations
python manage.py migrate

# Collect static into Storage
python manage.py collectstatic --no-input

# When ES enabled, use this command to rebuild indices
python manage.py search_index --rebuild

# Create superuser
python manage.py createsuperuser

# To enter interactive Django shell
python manage.py shell -i=python

Development environment

Docker setup

  1. Install the docker and docker-compose.
  2. Create the directory .env in the root project directory and paste the file vars inside the .env. Put the needed environments to vars.
  3. Run the project
docker-compose -f docker-compose.dev.yml up --build

Manual setup

1. Requirements:

  1. Install Python 3.9
  2. Install PostgreSQL 12.3
  3. Install Redis 6.2.5
  4. Install ElasticSearch

2. Install the project packages by command:

pipenv install

3. Collect static files

python manage.py collectstatic

4. Run migrations

python manage.py migrate --no-input

5. Run the project

python manage.py runserver

Test environment

Tests

Environments

ELASTICSEARCH_DSL_AUTO_REFRESH=False
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR=index.signals.FakeSignalProcessor

Description

For testing purposes we need all variables defined above. We need to set ELASTICSEARCH_DSL_AUTO_REFRESH=False not to force tests run very slowly. We need to set ELASTICSEARCH_DSL_SIGNAL_PROCESSOR=index.signals.FakeSignalProcessor to force tests run as usual.

Linter

Run

flake8 .

Notes

...

cxbootcamp_be_premier_watcher's People

Contributors

devihor avatar falled10 avatar mikhailkravets avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.