fix variable in env
This commit is contained in:
@@ -25,13 +25,21 @@ Dashboard giám sát camera IP gọn nhẹ chạy trên Orange Pi, dựa trên M
|
||||
|
||||
## Chạy dev (máy dev)
|
||||
|
||||
### 0) Tạo file .env
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
Sửa các biến trong `.env` theo IP/port thực tế (MediaMTX, recordings, CORS).
|
||||
|
||||
### 1) Chạy backend
|
||||
|
||||
```bash
|
||||
python3 -m venv api/.venv
|
||||
source api/.venv/bin/activate
|
||||
pip install -r api/requirements.txt
|
||||
uvicorn api.app.main:app --host 0.0.0.0 --port 8008
|
||||
python3 api/run.py
|
||||
```
|
||||
|
||||
### 2) Chạy frontend
|
||||
@@ -45,6 +53,8 @@ Frontend dev server đã được cấu hình proxy `/api` và `/videos` sang `h
|
||||
|
||||
## Cấu hình
|
||||
|
||||
Khuyến nghị cấu hình bằng file `.env` (copy từ `.env.example`).
|
||||
|
||||
Backend tự tạo file cấu hình tại `api/data/config.json` khi chạy lần đầu.
|
||||
|
||||
- `mediamtx_api_url`: ví dụ `http://127.0.0.1:9997`
|
||||
|
||||
Reference in New Issue
Block a user