update docs
This commit is contained in:
38
README.md
38
README.md
@@ -93,6 +93,27 @@ python schema/generate.py --typescript
|
||||
python schema/generate.py --proto
|
||||
```
|
||||
|
||||
## Media Storage
|
||||
|
||||
MPR stores media file paths **relative to the media root** for cloud portability.
|
||||
|
||||
### Local Development
|
||||
- Files: `/app/media/video.mp4`
|
||||
- Stored path: `video.mp4`
|
||||
- Served via: `http://mpr.local.ar/media/video.mp4` (nginx alias)
|
||||
|
||||
### AWS/Cloud Deployment
|
||||
For S3 or cloud storage, set `MEDIA_BASE_URL`:
|
||||
```bash
|
||||
MEDIA_BASE_URL=https://bucket.s3.amazonaws.com/
|
||||
```
|
||||
|
||||
- Files: S3 bucket
|
||||
- Stored path: `video.mp4` (same relative path)
|
||||
- Served via: `https://bucket.s3.amazonaws.com/video.mp4`
|
||||
|
||||
**Scan Endpoint**: `POST /api/assets/scan` recursively scans the media folder and registers new files with relative paths.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
@@ -105,18 +126,18 @@ mpr/
|
||||
├── ctrl/ # Docker & deployment
|
||||
│ ├── docker-compose.yml
|
||||
│ └── nginx.conf
|
||||
├── docs/ # Architecture diagrams
|
||||
├── grpc/ # gRPC server & client
|
||||
├── media/ # Media files (local storage)
|
||||
├── rpc/ # gRPC server & client
|
||||
│ └── protos/ # Protobuf definitions (generated)
|
||||
├── mpr/ # Django project
|
||||
│ └── media_assets/ # Django app
|
||||
├── schema/ # Source of truth
|
||||
│ └── models/ # Dataclass definitions
|
||||
├── ui/ # Frontend
|
||||
│ └── timeline/ # React app
|
||||
└── worker/ # Job execution
|
||||
├── executor.py # Executor abstraction
|
||||
└── tasks.py # Celery tasks
|
||||
├── task/ # Celery job execution
|
||||
│ ├── executor.py # Executor abstraction
|
||||
│ └── tasks.py # Celery tasks
|
||||
└── ui/ # Frontend
|
||||
└── timeline/ # React app
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
@@ -130,6 +151,9 @@ See `ctrl/.env.template` for all configuration options.
|
||||
| `GRPC_HOST` | grpc | gRPC server hostname |
|
||||
| `GRPC_PORT` | 50051 | gRPC server port |
|
||||
| `MPR_EXECUTOR` | local | Executor type (local/lambda) |
|
||||
| `MEDIA_ROOT` | /app/media | Media files directory |
|
||||
| `MEDIA_BASE_URL` | /media/ | Base URL for serving media (use S3 URL for cloud) |
|
||||
| `VITE_ALLOWED_HOSTS` | - | Comma-separated allowed hosts for Vite dev server |
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user