Skip to main content

Overview

This guide covers advanced configuration options for customizing your Docker deployment. Learn how to optimize resources, configure external services, and tune performance.

Environment Variables

All configuration is managed through environment variables in the .env file.

Core Configuration

string
required
Your Smallest.ai license key for validation and usage reporting
string
required
Download URL for the Lightning ASR model (provided by Smallest.ai)

API Server Configuration

integer
default:"7100"
Port for the API server to listen on
string
default:"http://license-proxy:6699"
Internal URL for license proxy communication
string
default:"http://lightning-asr:2233"
Internal URL for Lightning ASR communication

Lightning ASR Configuration

integer
default:"2233"
Port for Lightning ASR to listen on
string
default:"redis://redis:6379"
Redis connection URL for caching and state managementFor external Redis:
With password:
string
default:"0"
GPU device ID to use (for multi-GPU systems)

Resource Configuration

GPU Allocation

For systems with multiple GPUs, you can specify which GPU to use:
docker-compose.yml
For multiple GPUs per container:
docker-compose.yml

Memory Limits

Set memory limits for containers:
docker-compose.yml

CPU Allocation

Reserve CPU cores for each service:
docker-compose.yml

Redis Configuration

Using External Redis

To use an external Redis instance instead of the embedded one:
1

Update Environment

Modify .env file:
2

Update Docker Compose

Comment out or remove the Redis service:
docker-compose.yml
3

Update Dependencies

Remove Redis from depends_on:
docker-compose.yml

Redis Persistence

Enable data persistence for Redis:
docker-compose.yml

Redis with Authentication

Add password protection:
docker-compose.yml
Update .env:

Scaling Configuration

Multiple ASR Workers

Run multiple Lightning ASR containers for higher throughput:
docker-compose.yml
This configuration requires multiple GPUs in your system and will distribute load across workers.

Network Configuration

Custom Network Settings

Configure custom network with specific subnet:
docker-compose.yml

Expose on Specific Interface

Bind to specific host IP:
docker-compose.yml

Use Host Network

For maximum performance (loses network isolation):
docker-compose.yml
Host network mode bypasses Docker networking and directly uses host network stack. Use only if necessary.

Logging Configuration

Custom Log Drivers

Use JSON file logging with rotation:
docker-compose.yml

Syslog Integration

Send logs to syslog:
docker-compose.yml

Centralized Logging

Forward logs to external logging service:
docker-compose.yml

Volume Configuration

Persistent Model Storage

Avoid re-downloading models on container restart:
docker-compose.yml

Custom Model Location

Use a specific host directory:
docker-compose.yml

Health Checks

Custom Health Check Intervals

Adjust health check timing:
docker-compose.yml

API Server Health Check

Add health check for API server:
docker-compose.yml

Security Configuration

Run as Non-Root User

Add user specification:
docker-compose.yml

Read-Only Filesystem

Increase security with read-only root filesystem:
docker-compose.yml

Resource Limits

Prevent resource exhaustion:
docker-compose.yml

Example: Production Configuration

Here’s a complete production-ready configuration:
docker-compose.yml

What’s Next?

STT Services Overview

Learn about each service component in detail

STT Troubleshooting

Debug common issues and optimize performance