Channels-dvr docker compose setup

does anyone have a example copy of their docker compose file they are using to run channels-dvr with compose instead of the docker run command? I'm getting errors with environment variables and wanted to see a stock .yml file for channels that someone else is running to make sure im not making any mistakes. thanks for any help.

chris
Yulee, FL.

You may have to adjust some values based on what you're running docker on.
Here's the one recommended by Channels

Here's one where I'm using the TVE tagged version in a container on my Synology NAS and using port 8189 instead of the default 8089.

services:
  # Docker container home: https://hub.docker.com/r/fancybits/channels-dvr
  # image uses host mode networking and port is specified by env variable CHANNELS_PORT
  channels-dvr-8189:
    image: fancybits/channels-dvr:tve                        # use :tve tag, not :latest
    container_name: channels-dvr-8189
    network_mode: "host"                                     # must run in host, not bridge mode
    devices:
      - "/dev/dri:/dev/dri"                                  # to enable hardware transcoding
    environment:
      - CHANNELS_PORT=8189                                   # host port number to use
      - TZ=America/Los_Angeles                               # local timezone in standard linux format
    volumes:
      - "/volume1/docker/channels-dvr-8189:/channels-dvr"    # Channels DVR executables and log directory
      - "/volume1/ChDVR8189:/volume1/ChDVR8189"              # Channels DVR recording directory
      - "/volume1/arkives/importtest:/shares/imports:ro"     # Volumes for local content import directories
    restart: unless-stopped

I use https://www.composerize.com/ to convert a docker run command to docker compose. It always has legal syntax, but you may need to touch up some details of files used.

Below is how I'm running it.

  channels-dvr:
    image: fancybits/channels-dvr:latest  
    container_name: Channels-DVR
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
    restart: unless-stopped
    devices:
      - '/dev/dri:/dev/dri'
    volumes:
      - /home/docker/channels-dvr/config:/channels-dvr
      - /home/docker/channels-dvr/recordings:/shares/DVR