version: "3.9"
services:
  handbrake:
    image: jlesage/handbrake:latest
    container_name: handbrake
    hostname: handbrake
    mem_limit: 4g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:5800
    ports:
      - 5800:5800
    labels:
      - "watchtower.ignore=true"
    volumes:
      - ./config:/config:rw
      - ./storage:/storage:ro
      - ./watch:/watch:rw
      - ./output:/output:rw
    devices:
      - /dev/dri:/dev/dri
    environment:
      HANDBRAKE_QSV: 1
      USER_ID: 1000
      GROUP_ID: 1000
      DISPLAY_WIDTH: 1920
      DISPLAY_HEIGHT: 1080
      TZ: Europe/Paris
      DARK_MODE: 1
      VNC_LISTENING_PORT: -1
      AUTOMATED_CONVERSION: 0
      LANG: fr_FR
    restart: unless-stopped
