diff --git a/docker-compose.yml b/docker-compose.yml index ad792b3..5f51f54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,21 @@ services: - dispatcharr: - # build: - # context: . - # dockerfile: Dockerfile + web: image: ghcr.io/dispatcharr/dispatcharr:latest - container_name: dispatcharr + container_name: dispatcharr_web ports: - 9191:9191 volumes: - - /var/lib/docker/volumes/dispatcharr/_data:/data + - /var/lib/docker/volumes/dispatharr/data:/data + depends_on: + - db + - redis environment: - - DISPATCHARR_ENV=aio - - REDIS_HOST=localhost - - CELERY_BROKER_URL=redis://localhost:6379/0 + - 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) @@ -28,8 +31,11 @@ services: #cap_add: # - SYS_NICE # Optional for hardware acceleration - devices: - - /dev/dri:/dev/dri # For Intel/AMD GPU acceleration (VA-API) + #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: @@ -39,3 +45,42 @@ services: # - driver: nvidia # count: all # 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