Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 1.99 KB

README.md

File metadata and controls

69 lines (50 loc) · 1.99 KB

HHRU Question Bot

Run or stop stack from root

  • make serve to run dev mode
  • make down to stop

Use local resources to watch project

Develop with each service

  1. Go to service folder, f.e. cd data-api/app and create VSCode project by code .

  2. Install poery dependencies and add environment for python linting. Use poetry config virtualenvs.in-project true for creation of env folder inside project. Then poetry init (if pyproject.toml not exist) and poetry install --with dev.

  3. Inside container use:

    • pytest -v -s -x for all tests
    • use python -m IPython to check code
    • mypy --install-types
    • mypy app and flake8 app

Links

Scheme of services

scheme

For using services define .env file with variables

You must use telegram and hh.ru official API accounts.

# mongo dev
DEV_ROOT_USERNAME=
DEV_ROOT_PASSWORD=
# mongo admin panel
ADMINUSERNAME=
ADMINPASSWORD=
MONGODB_URL=mongodb://${DEV_ROOT_USERNAME}:${DEV_ROOT_PASSWORD}@wzzzz-mongo-dev:27017/
DB_NAME=dev-db

TEST_ROOT_USERNAME=mongo-test
TEST_ROOT_PASSWORD=123456789
TEST_MONGODB_URL=mongodb://${TEST_ROOT_USERNAME}:${TEST_ROOT_PASSWORD}@wzzzz-mongo-test:27021/

# telegram api token
TG_API_TOKEN=

# hh.ru secrets
CLIENT_ID=
CLIENT_SECRET=
HHRU_API_TOKEN=
HHRU_CLIENT_EMAIL=

# redis
REDIS_URL=wzzzz-redis-dev

Still oppened problems