mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 10:45:27 +00:00
- docker-compose: added service health checks - dockerfile: added if logic for sed command so missing files do not cause build fail - entrypoint.celery: change migration detection to not continue until ALL migrations are applied - entrypoint: trim django key and change external postgres check to python in case postgres binaries are missing
109 lines
3.2 KiB
YAML
109 lines
3.2 KiB
YAML
services:
|
|
web:
|
|
image: ghcr.io/dispatcharr/dispatcharr:latest
|
|
container_name: dispatcharr_web
|
|
ports:
|
|
- 9191:9191
|
|
volumes:
|
|
- ./data:/data
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
environment:
|
|
- DISPATCHARR_ENV=modular
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_DB=dispatcharr
|
|
- POSTGRES_USER=dispatch
|
|
- POSTGRES_PASSWORD=secret
|
|
- REDIS_HOST=redis
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- DISPATCHARR_LOG_LEVEL=info
|
|
# Legacy CPU Support (Optional)
|
|
# Uncomment to enable legacy NumPy build for older CPUs (circa 2009)
|
|
# that lack support for newer baseline CPU features
|
|
#- USE_LEGACY_NUMPY=true
|
|
# Process Priority Configuration (Optional)
|
|
# Lower values = higher priority. Range: -20 (highest) to 19 (lowest)
|
|
# Negative values require cap_add: SYS_NICE (uncomment below)
|
|
#- UWSGI_NICE_LEVEL=-5 # uWSGI/FFmpeg/Streaming (default: 0, recommended: -5 for high priority)
|
|
#
|
|
# Uncomment to enable high priority for streaming (required if UWSGI_NICE_LEVEL < 0)
|
|
#cap_add:
|
|
# - SYS_NICE
|
|
# Optional for hardware acceleration
|
|
#group_add:
|
|
# - video
|
|
# #- render # Uncomment if your GPU requires it
|
|
#devices:
|
|
# - /dev/dri:/dev/dri # For Intel/AMD GPU acceleration (VA-API)
|
|
# Uncomment the following lines for NVIDIA GPU support
|
|
# NVidia GPU support (requires NVIDIA Container Toolkit)
|
|
#deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# count: all
|
|
# capabilities: [gpu]
|
|
|
|
celery:
|
|
image: ghcr.io/dispatcharr/dispatcharr:latest
|
|
container_name: dispatcharr_celery
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
web:
|
|
condition: service_started
|
|
volumes:
|
|
- ./data:/data
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
environment:
|
|
- DISPATCHARR_ENV=modular
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_DB=dispatcharr
|
|
- POSTGRES_USER=dispatch
|
|
- POSTGRES_PASSWORD=secret
|
|
- REDIS_HOST=redis
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- DISPATCHARR_LOG_LEVEL=info
|
|
#- CELERY_NICE_LEVEL=5 #Celery/EPG/Background tasks (default:5, low priority; Range: -20 to 19)
|
|
- DJANGO_SETTINGS_MODULE=dispatcharr.settings
|
|
- PYTHONUNBUFFERED=1
|
|
# Uncomment to enable high priority for Celery (required if CELERY_NICE_LEVEL < 0)
|
|
#cap_add:
|
|
# - SYS_NICE
|
|
entrypoint: ["/app/docker/entrypoint.celery.sh"]
|
|
|
|
db:
|
|
image: postgres:14
|
|
container_name: dispatcharr_db
|
|
ports:
|
|
- "5436:5432"
|
|
environment:
|
|
- POSTGRES_DB=dispatcharr
|
|
- POSTGRES_USER=dispatch
|
|
- POSTGRES_PASSWORD=secret
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U dispatch -d dispatcharr"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: dispatcharr_redis
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|