mirror of
https://github.com/sfiorini/iptv-server.git
synced 2026-04-11 08:50:46 +00:00
Switch to redis db for user registration
This commit is contained in:
25
README.md
25
README.md
@@ -54,8 +54,8 @@ You can install and run the project either manually or using Docker.
|
||||
```env
|
||||
SUPER_ADMIN_USER=your_super_admin_username
|
||||
SUPER_ADMIN_PASSWORD=your_super_admin_password
|
||||
DATABASE_FILENAME=users.db
|
||||
DATA_PATH=/data
|
||||
KV_REST_API_TOKEN="REdIslONglOnGtOkEn"
|
||||
KV_REST_API_URL="https://redis-url.upstash.io"
|
||||
CONTENT_PATH=/content
|
||||
```
|
||||
|
||||
@@ -85,7 +85,7 @@ You can install and run the project either manually or using Docker.
|
||||
### Running Manually
|
||||
|
||||
1. Ensure you have activated the virtual environment (if installed manually).
|
||||
2. Ensure your environment variables (`SUPER_ADMIN_USER`, `SUPER_ADMIN_PASSWORD`, `DATABASE_FILENAME`, `DATA_PATH`, `CONTENT_PATH`) are set.
|
||||
2. Ensure your environment variables (`SUPER_ADMIN_USER`, `SUPER_ADMIN_PASSWORD`, `CONTENT_PATH`) are set.
|
||||
3. Run the application using uvicorn:
|
||||
|
||||
```bash
|
||||
@@ -103,20 +103,20 @@ You can install and run the project either manually or using Docker.
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name user-service \
|
||||
--name iptv-server \
|
||||
-p 8000:8000 \
|
||||
-v user-service-data:/data \
|
||||
-v user-service-content:/content \
|
||||
-v iptv-server-content:/content \
|
||||
-e SUPER_ADMIN_USER=your_super_admin_username \
|
||||
-e SUPER_ADMIN_PASSWORD=your_super_admin_password \
|
||||
-e KV_REST_API_TOKEN=REdIslONglOnGtOkEn \
|
||||
-e KV_REST_API_URL=https://redis-url.upstash.io \
|
||||
iptv-server
|
||||
```
|
||||
|
||||
Replace `your_super_admin_username` and `your_super_admin_password` with your desired credentials.
|
||||
|
||||
Key components:
|
||||
* `-v user-service-data:/data` creates/manages a Docker volume for persistent database storage
|
||||
* `-v user-service-content:/content` ensures content directory persistence
|
||||
* `-v iptv-server-content:/content` ensures content directory persistence
|
||||
* Environment variables match those expected by the application (defined in Dockerfile)
|
||||
|
||||
The application will be available at `http://localhost:8000` (or your Docker host's IP).
|
||||
@@ -125,13 +125,13 @@ You can install and run the project either manually or using Docker.
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name user-service \
|
||||
--name iptv-server \
|
||||
-p 8000:8000 \
|
||||
-v ./local/data:/data \
|
||||
-v ./local/content:/content \
|
||||
-e SUPER_ADMIN_USER=admin \
|
||||
-e SUPER_ADMIN_PASSWORD=securepassword \
|
||||
user-registration-service
|
||||
iptv-server
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -155,7 +155,8 @@ The application is configured using the following environment variables:
|
||||
|
||||
* `SUPER_ADMIN_USER`: The username for the superadmin Basic Authentication.
|
||||
* `SUPER_ADMIN_PASSWORD`: The password for the superadmin Basic Authentication.
|
||||
* `DATABASE_PATH`: The file path where the SQLite database will be stored. Defaults to `users.db` if not set, but the Dockerfile sets it to `/data/users.db`.
|
||||
* `KV_REST_API_TOKEN`: The token for interacting with Upstash\'s Redis service.
|
||||
* `KV_REST_API_URL`: The URL for Upstash\'s Redis service.
|
||||
|
||||
## Project Structure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user