2023-10-23 17:47:11 +03:00
|
|
|
# discoursio-core
|
2021-08-21 02:17:15 +03:00
|
|
|
|
|
|
|
|
2022-11-22 08:18:48 +03:00
|
|
|
- sqlalchemy
|
2021-08-21 02:17:15 +03:00
|
|
|
- redis
|
|
|
|
- ariadne
|
|
|
|
- starlette
|
2022-11-22 08:18:48 +03:00
|
|
|
- uvicorn
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2022-11-22 04:11:26 +01:00
|
|
|
# Local development
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2022-06-14 08:41:40 +03:00
|
|
|
Install deps first
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2022-05-31 10:03:50 +03:00
|
|
|
on osx
|
2021-08-21 02:17:15 +03:00
|
|
|
```
|
2022-12-03 12:50:18 +03:00
|
|
|
brew install redis nginx postgres
|
2021-08-21 02:17:15 +03:00
|
|
|
brew services start redis
|
|
|
|
```
|
|
|
|
|
2022-05-31 10:03:50 +03:00
|
|
|
on debian/ubuntu
|
|
|
|
```
|
2022-08-09 13:17:31 +03:00
|
|
|
apt install redis nginx
|
2021-08-21 02:17:15 +03:00
|
|
|
```
|
|
|
|
|
2022-08-11 13:06:31 +03:00
|
|
|
Then run nginx, redis and API server
|
2023-11-27 11:12:42 +03:00
|
|
|
|
|
|
|
```shell
|
|
|
|
mkdir .venv
|
|
|
|
python3.12 -m venv .venv
|
|
|
|
poetry env use .venv/bin/python3.12
|
|
|
|
poetry update
|
|
|
|
poetry run python server.py
|
2022-06-14 08:41:40 +03:00
|
|
|
```
|
2023-11-22 19:38:39 +03:00
|
|
|
## Services
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2023-11-22 19:38:39 +03:00
|
|
|
### Auth
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2023-11-29 00:19:33 +03:00
|
|
|
Put the header 'Authorization' with token from signIn query or registerUser mutation. Setup `WEBHOOK_SECRET` env var
|
2022-05-31 15:19:05 +03:00
|
|
|
|
2023-11-22 19:38:39 +03:00
|
|
|
### Viewed
|
2022-11-27 11:19:38 +03:00
|
|
|
|
2023-11-22 19:38:39 +03:00
|
|
|
Set ACKEE_TOKEN var to collect stats
|
2022-11-27 11:19:38 +03:00
|
|
|
|
2023-11-22 19:38:39 +03:00
|
|
|
### Seacrh
|
2023-10-15 15:27:44 -03:00
|
|
|
|
2023-11-22 19:38:39 +03:00
|
|
|
ElasticSearch
|
|
|
|
|
|
|
|
### Notifications
|
|
|
|
|
|
|
|
Connected using Redis PubSub channels
|
|
|
|
|
|
|
|
### Inbox
|
|
|
|
|
|
|
|
To get unread counter raw redis query to Inbox's data is used
|
|
|
|
|
|
|
|
|
|
|
|
### Following Manager
|
|
|
|
|
|
|
|
Internal service with async access to storage
|