docs: update local setup and add phub CLI alias
This commit is contained in:
@@ -45,7 +45,7 @@ For complete configuration options, see `.env.example`.
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -e .[dev]
|
||||
python -m pip install -e '.[dev]'
|
||||
|
||||
# Configure .env
|
||||
cp .env.example .env
|
||||
@@ -57,9 +57,46 @@ uvicorn app.main:app --reload
|
||||
pytest
|
||||
```
|
||||
|
||||
If you need local infrastructure for TimescaleDB, Redis, and Loki, start them with Docker Compose before running the app:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.local-test.yml up -d
|
||||
docker compose -f docker-compose.local-test.yml ps
|
||||
```
|
||||
|
||||
Default endpoints exposed by `docker-compose.local-test.yml`:
|
||||
|
||||
- TimescaleDB: `127.0.0.1:5432`
|
||||
- Redis: `127.0.0.1:6379` (RedisInsight UI: `127.0.0.1:8001`)
|
||||
- Loki: `127.0.0.1:3100`
|
||||
|
||||
Typical `.env` values for this local setup:
|
||||
|
||||
```env
|
||||
PORTFOLIOHUB_DB_ENABLED=true
|
||||
TIMESCALEDB_HOST=127.0.0.1
|
||||
TIMESCALEDB_PORT=5432
|
||||
TIMESCALEDB_USER=portfolio_hub_user
|
||||
TIMESCALEDB_PASSWORD=change-me
|
||||
TIMESCALEDB_NAME=portfolio_hub
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
|
||||
LOKI_HOST=127.0.0.1
|
||||
LOKI_PORT=3100
|
||||
```
|
||||
|
||||
To stop and remove the local containers:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.local-test.yml down
|
||||
```
|
||||
|
||||
## CLI
|
||||
|
||||
The repository now includes a `portfoliohub` CLI that mirrors the main portfolio flows from `jsbot-kis`.
|
||||
The same commands are also available through the shorter alias `phub`.
|
||||
|
||||
```bash
|
||||
portfoliohub --help
|
||||
|
||||
Reference in New Issue
Block a user