Add optional configuration section

Add details about consumer replicas

Add CONSUMER_REPLICAS to .env.example

Change `consumer: deploy: replicas` to use CONSUMER_REPLICAS var to keep user config options in one file
This commit is contained in:
funkecoder23
2024-02-04 16:25:38 -05:00
parent 2593bbdb73
commit 101b5c416e
3 changed files with 13 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ A self-hosted Stremio addon for streaming torrents via a debrid service.
- [Using](#using) - [Using](#using)
- [Download Docker and Docker Compose v2](#download-docker-and-docker-compose-v2) - [Download Docker and Docker Compose v2](#download-docker-and-docker-compose-v2)
- [Environment Setup](#environment-setup) - [Environment Setup](#environment-setup)
- [Optional Configuration Changes](#optional-configuration-changes)
- [DebridMediaManager setup (optional)](#debridmediamanager-setup-optional) - [DebridMediaManager setup (optional)](#debridmediamanager-setup-optional)
- [Run the project](#run-the-project) - [Run the project](#run-the-project)
- [Monitoring with Grafana and Prometheus (Optional)](#monitoring-with-grafana-and-prometheus-optional) - [Monitoring with Grafana and Prometheus (Optional)](#monitoring-with-grafana-and-prometheus-optional)
@@ -54,6 +55,16 @@ cp .env.example .env
Then set any of the values you wouldd like to customize. Then set any of the values you wouldd like to customize.
#### Optional Configuration Changes
> [!WARNING]
> These values should be tested and tuned for your specific machine.
By default, Knight Crawler is configured to be *relatively* conservative in its resource usage. If running on a decent machine (16GB RAM, i5+ or equivalent), you can increase some settings to increase consumer throughput. This is especially helpful if you have a large backlog from [importing databases](#importing-external-dumps).
In your `.env` file, under the `# Consumer` section increase `CONSUMER_REPLICAS` from `3` to `15`.
You can also increase `JOB_CONCURRENCY` from `5` to `10`.
### DebridMediaManager setup (optional) ### DebridMediaManager setup (optional)
There are some optional steps you should take to maximise the number of movies/tv shows we can find. There are some optional steps you should take to maximise the number of movies/tv shows we can find.

View File

@@ -26,6 +26,7 @@ JOBS_ENABLED=true
MAX_SINGLE_TORRENT_CONNECTIONS=10 MAX_SINGLE_TORRENT_CONNECTIONS=10
TORRENT_TIMEOUT=30000 TORRENT_TIMEOUT=30000
UDP_TRACKERS_ENABLED=true UDP_TRACKERS_ENABLED=true
CONSUMER_REPLICAS=3
# Producer # Producer
RabbitMqConfiguration__Host=rabbitmq RabbitMqConfiguration__Host=rabbitmq

View File

@@ -101,7 +101,7 @@ services:
labels: labels:
logging: "promtail" logging: "promtail"
deploy: deploy:
replicas: 3 replicas: ${CONSUMER_REPLICAS}
<<: *knightcrawler-app <<: *knightcrawler-app
networks: networks:
- knightcrawler-network - knightcrawler-network