-
Notifications
You must be signed in to change notification settings - Fork 0
Containers
Complete documentation for StreamTV container distributions.
Complete container distributions for StreamTV across all major container platforms.
🐳 Docker
- Single container deployment
- Multi-stage builds
- Health checks
- Production-ready configuration
- Multi-service orchestration
- Volume management
- Network isolation
- Production overrides
☸️ Kubernetes
- Complete K8s manifests
- ConfigMaps and Secrets
- PersistentVolumeClaims
- Ingress configuration
- Kustomize support
🔷 Podman
- Rootless containers
- Docker-compatible
- Pod support
- Systemd integration
| Feature | Docker | Docker Compose | Kubernetes | Podman |
|---|---|---|---|---|
| Ease of Use | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ |
| Orchestration | ❌ | ✅ | ✅✅ | ✅ |
| Production Ready | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| Rootless | ❌ | ❌ | ✅ | ✅ |
| Scaling | Manual | Limited | ✅✅ | Limited |
| Best For | Development | Small deployments | Production clusters | Rootless needs |
- You're getting started
- Single server deployment
- Simple setup needed
- Development environment
- Multiple services needed
- Local development
- Small production deployments
- Easy orchestration
- Production cluster deployment
- Need auto-scaling
- High availability required
- Enterprise environment
- Rootless operation needed
- Security is priority
- Docker alternative desired
- Systemd integration needed
Docker/Podman:
docker build -t streamtv:latest .
podman build -t streamtv:latest .Docker Compose:
docker-compose buildKubernetes:
# Build and push to registry
docker build -t registry/streamtv:v1.0.0 .
docker push registry/streamtv:v1.0.0Docker:
docker run -d -p 8410:8410 streamtv:latestDocker Compose:
docker-compose up -dKubernetes:
kubectl apply -f deployment.yamlPodman:
podman run -d -p 8410:8410 streamtv:latestDocker/Podman:
docker logs -f streamtv
podman logs -f streamtvDocker Compose:
docker-compose logs -fKubernetes:
kubectl logs -f deployment/streamtvAll platforms support the same environment variables:
STREAMTV_SERVER_HOST=0.0.0.0
STREAMTV_SERVER_PORT=8410
STREAMTV_YOUTUBE_API_KEY=your_key
STREAMTV_ARCHIVE_ORG_USERNAME=username
STREAMTV_ARCHIVE_ORG_PASSWORD=passwordSee individual platform READMEs for platform-specific configuration.
All platforms support persistent storage:
- Docker: Named volumes or bind mounts
- Docker Compose: Named volumes
- Kubernetes: PersistentVolumeClaims
- Podman: Named volumes or bind mounts
- 8410: Main web interface and API
- 5004: HDHomeRun streaming
- 1900/udp: SSDP discovery
- Docker/Podman: Direct port mapping
- Docker Compose: Service networking
- Kubernetes: Service, Ingress, or LoadBalancer
All platforms include health checks:
- HTTP endpoint:
/api/health - Interval: 30 seconds
- Timeout: 10 seconds
- Retries: 3
- Use existing Dockerfile
- Create
docker-compose.yml - Run
docker-compose up
- Build and push image to registry
- Update
deployment.yamlwith image - Apply manifests:
kubectl apply -f .
- Use same Dockerfile
- Replace
dockerwithpodmanin commands - No other changes needed!
- Use .env files for sensitive configuration
- Enable health checks for automatic recovery
- Set resource limits to prevent resource exhaustion
- Use named volumes for persistent data
- Regular backups of volume data
- Keep images updated for security patches
- Monitor logs for issues
- Use secrets management for production
Port already in use:
- Change port in configuration
- Or stop conflicting service
Permission denied:
- Check volume permissions
- Use rootless Podman if possible
Container won't start:
- Check logs:
docker logs streamtv - Verify environment variables
- Check health endpoint
Data not persisting:
- Verify volume mounts
- Check volume permissions
- Ensure volumes are created
See LICENSE file for details.
Complete Docker distribution for StreamTV with multi-stage builds, health checks, and production-ready configurations.
-
Clone or extract this directory
-
Create environment file (optional):
cp .env.example .env # Edit .env with your configuration -
Start StreamTV:
docker-compose up -d
-
Access the web interface: Open http://localhost:8410 in your browser
-
View logs:
docker-compose logs -f streamtv
-
Stop StreamTV:
docker-compose down
-
Build the image:
docker build -t streamtv:latest . -
Run the container:
docker run -d \ --name streamtv \ -p 8410:8410 \ -v streamtv_data:/app/data \ -v streamtv_schedules:/app/schedules \ -v streamtv_logs:/app/logs \ -e STREAMTV_SERVER_BASE_URL=http://localhost:8410 \ streamtv:latest
-
Access the web interface: Open http://localhost:8410
All configuration can be set via environment variables:
# Server
STREAMTV_SERVER_HOST=0.0.0.0
STREAMTV_SERVER_PORT=8410
STREAMTV_SERVER_BASE_URL=http://localhost:8410
# Database
STREAMTV_DATABASE_URL=sqlite:///./data/streamtv.db
# YouTube
STREAMTV_YOUTUBE_ENABLED=true
STREAMTV_YOUTUBE_API_KEY=your_api_key_here
# Archive.org
STREAMTV_ARCHIVE_ORG_ENABLED=true
STREAMTV_ARCHIVE_ORG_USERNAME=your_username
STREAMTV_ARCHIVE_ORG_PASSWORD=your_password
# Security
STREAMTV_SECURITY_ACCESS_TOKEN=your_token_hereCreate a .env file in the same directory as docker-compose.yml:
YOUTUBE_API_KEY=your_key_here
ARCHIVE_ORG_USERNAME=your_username
ARCHIVE_ORG_PASSWORD=your_password
PLEX_BASE_URL=http://192.168.1.100:32400
PLEX_TOKEN=your_plex_tokenTo use a custom config.yaml:
Enhanced Docker Compose distribution with additional services, monitoring, and production configurations.
- Multi-service orchestration: StreamTV with optional supporting services
- Health monitoring: Built-in health checks and monitoring
- Volume management: Persistent data storage
- Network isolation: Custom networks for service communication
- Production ready: Optimized configurations for production use
docker-compose up -ddocker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dThe core StreamTV application.
Ports:
- 8410: Web interface and API
- 5004: HDHomeRun streaming
- 1900/udp: SSDP discovery
Add these to docker-compose.yml as needed:
services:
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
networks:
- streamtv-networkservices:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: streamtv
POSTGRES_USER: streamtv
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- streamtv-networknetworks:
streamtv-frontend:
driver: bridge
streamtv-backend:
driver: bridge
internal: true # Isolated network
---
## Kubernetes
# StreamTV Kubernetes Distribution
Complete Kubernetes manifests for deploying StreamTV in a Kubernetes cluster.
## Prerequisites
- Kubernetes cluster (v1.20+)
- kubectl configured
- PersistentVolume provisioner (for data storage)
- Ingress controller (optional, for external access)
## Quick Start
### 1. Create Namespace
```bash
kubectl apply -f namespace.yaml# Update configmap.yaml with your settings
kubectl apply -f configmap.yaml
# Create secrets (update with your values)
kubectl apply -f secrets.yaml
# Or create from command line:
kubectl create secret generic streamtv-secrets \
--from-literal=youtube-api-key='your-key' \
--from-literal=access-token='your-token' \
-n streamtvkubectl apply -f pvc.yamlkubectl apply -f deployment.yaml
kubectl apply -f service.yaml# Update ingress.yaml with your domain
kubectl apply -f ingress.yamlkubectl get pods -n streamtv
kubectl get svc -n streamtv
kubectl logs -f deployment/streamtv -n streamtv# Apply all resources
kubectl apply -k .
# With custom image
kubectl apply -k . --dry-run=client -o yaml | \
sed 's|streamtv:latest|your-registry/streamtv:v1.0.0|' | \
kubectl apply -f -Update configmap.yaml with your settings:
data:
base_url: "http://streamtv.example.com"
plex-base-url: "http://plex.example.com:32400"Create secrets for sensitive data:
kubectl create secret generic streamtv-secrets \
--from-literal=youtube-api-key='your-key' \
--from-literal=archive-org-username='username' \
--from-literal=archive-org-password='password' \
--from-literal=access-token='token' \
--from-literal=plex-token='plex-token' \
-n streamtvComplete Podman distribution for StreamTV. Podman is a daemonless container engine that is fully compatible with Docker images and commands.
- Rootless: Run containers without root privileges
- Daemonless: No background daemon required
- Docker-compatible: Uses same images and commands
- Security: Better isolation and security features
-
Kubernetes: Native Kubernetes support via
podman play kube
Install Podman on your system:
# Ubuntu/Debian
sudo apt install podman
# Fedora/RHEL/CentOS
sudo dnf install podman
# Arch Linux
sudo pacman -S podmanbrew install podman
podman machine init
podman machine start# Using Chocolatey
choco install podman
# Or download from podman.io-
Install podman-compose:
pip install podman-compose # Or sudo dnf install podman-compose -
Start StreamTV:
podman-compose up -d
-
Access the web interface: Open http://localhost:8410
-
View logs:
podman-compose logs -f streamtv
-
Stop StreamTV:
podman-compose down
-
Build the image:
podman build -t streamtv:latest .
This document describes the RESTful API for StreamTV, modeled after ErsatzTV's API structure.
All API endpoints are prefixed with /api unless otherwise noted.
If api_key_required is enabled in configuration, include the access token as a query parameter:
?access_token=YOUR_TOKEN
GET /api/channels
Returns a list of all channels.
Response:
[
{
"id": 1,
"number": "1",
"name": "My Channel",
"group": "Entertainment",
"enabled": true,
"logo_path": null,
"created_at": "2024-01-01T00:00:00",
"updated_at": "2024-01-01T00:00:00"
}
]GET /api/channels/{channel_id}
GET /api/channels/number/{channel_number}
POST /api/channels
Content-Type: application/json
{
"number": "1",
"name": "My Channel",