Change to modular configuration

This commit is contained in:
2026-02-06 18:16:09 +01:00
parent d96fd02c70
commit 5e374feaab
+56 -11
View File
@@ -1,18 +1,21 @@
services: services:
dispatcharr: web:
# build:
# context: .
# dockerfile: Dockerfile
image: ghcr.io/dispatcharr/dispatcharr:latest image: ghcr.io/dispatcharr/dispatcharr:latest
container_name: dispatcharr container_name: dispatcharr_web
ports: ports:
- 9191:9191 - 9191:9191
volumes: volumes:
- /var/lib/docker/volumes/dispatcharr/_data:/data - /var/lib/docker/volumes/dispatharr/data:/data
depends_on:
- db
- redis
environment: environment:
- DISPATCHARR_ENV=aio - POSTGRES_HOST=db
- REDIS_HOST=localhost - POSTGRES_DB=dispatcharr
- CELERY_BROKER_URL=redis://localhost:6379/0 - POSTGRES_USER=dispatch
- POSTGRES_PASSWORD=secret
- REDIS_HOST=redis
- CELERY_BROKER_URL=redis://redis:6379/0
- DISPATCHARR_LOG_LEVEL=info - DISPATCHARR_LOG_LEVEL=info
# Legacy CPU Support (Optional) # Legacy CPU Support (Optional)
# Uncomment to enable legacy NumPy build for older CPUs (circa 2009) # Uncomment to enable legacy NumPy build for older CPUs (circa 2009)
@@ -28,8 +31,11 @@ services:
#cap_add: #cap_add:
# - SYS_NICE # - SYS_NICE
# Optional for hardware acceleration # Optional for hardware acceleration
devices: #group_add:
- /dev/dri:/dev/dri # For Intel/AMD GPU acceleration (VA-API) # - 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 # Uncomment the following lines for NVIDIA GPU support
# NVidia GPU support (requires NVIDIA Container Toolkit) # NVidia GPU support (requires NVIDIA Container Toolkit)
#deploy: #deploy:
@@ -39,3 +45,42 @@ services:
# - driver: nvidia # - driver: nvidia
# count: all # count: all
# capabilities: [gpu] # capabilities: [gpu]
celery:
image: ghcr.io/dispatcharr/dispatcharr:latest
container_name: dispatcharr_celery
depends_on:
- db
- redis
volumes:
- ../:/app
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- POSTGRES_HOST=db
- POSTGRES_DB=dispatcharr
- POSTGRES_USER=dispatch
- POSTGRES_PASSWORD=secret
- REDIS_HOST=redis
- CELERY_BROKER_URL=redis://redis:6379/0
command: >
bash -c "
cd /app &&
nice -n 5 celery -A dispatcharr worker -l info
"
db:
image: postgres:14
container_name: dispatcharr_db
ports:
- "5436:5432"
environment:
- POSTGRES_DB=dispatcharr
- POSTGRES_USER=dispatch
- POSTGRES_PASSWORD=secret
volumes:
- /var/lib/docker/volumes/dispatcharr_postgre/:/var/lib/postgresql/data
redis:
image: redis:latest
container_name: dispatcharr_redis